nested.js 313 B

1234567891011121314151617
  1. module.exports = function(hljs) {
  2. var BODY = {
  3. className: 'body', endsWithParent: true
  4. };
  5. var LIST = {
  6. className: 'list',
  7. variants: [
  8. {begin: /\(/, end: /\)/},
  9. {begin: /\[/, end: /\]/}
  10. ],
  11. contains: [BODY]
  12. };
  13. BODY.contains = [LIST];
  14. return {
  15. contains: [LIST]
  16. }
  17. };