mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
[language-gfm] Make each block-level HTML tag its own injection…
…which, surprising as it sounds, has a _huge_ performance benefit.
This commit is contained in:
parent
6d36685df3
commit
3d70f62953
@ -23,13 +23,11 @@ exports.activate = () => {
|
|||||||
languageScope: null
|
languageScope: null
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create one HTML injection layer for all block-level HTML nodes.
|
// A separate injection layer for each block-level HTML node.
|
||||||
atom.grammars.addInjectionPoint('source.gfm', {
|
atom.grammars.addInjectionPoint('source.gfm', {
|
||||||
type: 'document',
|
type: 'html_block',
|
||||||
language: () => 'html',
|
language: () => 'html',
|
||||||
content(node) {
|
content: (node) => node,
|
||||||
return node.descendantsOfType('html_block');
|
|
||||||
},
|
|
||||||
includeChildren: true
|
includeChildren: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user