prism-gedcom.js 720 B

12345678910111213141516171819202122232425262728
  1. Prism.languages.gedcom = {
  2. 'line-value': {
  3. // Preceded by level, optional pointer, and tag
  4. pattern: /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
  5. lookbehind: true,
  6. inside: {
  7. 'pointer': {
  8. pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
  9. alias: 'variable'
  10. }
  11. }
  12. },
  13. 'record': {
  14. // Preceded by level and optional pointer
  15. pattern: /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
  16. lookbehind: true,
  17. alias: 'tag'
  18. },
  19. 'level': {
  20. pattern: /(^[\t ]*)\d+/m,
  21. lookbehind: true,
  22. alias: 'number'
  23. },
  24. 'pointer': {
  25. pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
  26. alias: 'variable'
  27. }
  28. };