syntax.ts 252 B

1234567891011121314151617
  1. import { Grammar } from 'prismjs';
  2. export const tokenizer: Grammar = {
  3. key: {
  4. pattern: /[^\s]+(?==)/,
  5. alias: 'attr-name',
  6. },
  7. operator: /[=]/,
  8. value: [
  9. {
  10. pattern: /"(.+)"/,
  11. },
  12. {
  13. pattern: /[^\s]+/,
  14. },
  15. ],
  16. };