Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More variables for better code compression #1489

Merged
merged 6 commits into from
Mar 10, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 53 additions & 51 deletions components/prism-asciidoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,67 +199,69 @@

// Allow some nesting. There is no recursion though, so cloning should not be needed.

var asciidoc = Prism.languages.asciidoc;

attributes.inside['interpreted'].inside.rest = {
'macro': Prism.languages.asciidoc['macro'],
'inline': Prism.languages.asciidoc['inline'],
'replacement': Prism.languages.asciidoc['replacement'],
'entity': Prism.languages.asciidoc['entity']
'macro': asciidoc['macro'],
'inline': asciidoc['inline'],
'replacement': asciidoc['replacement'],
'entity': asciidoc['entity']
};

Prism.languages.asciidoc['passthrough-block'].inside.rest = {
'macro': Prism.languages.asciidoc['macro']
asciidoc['passthrough-block'].inside.rest = {
'macro': asciidoc['macro']
};

Prism.languages.asciidoc['literal-block'].inside.rest = {
'callout': Prism.languages.asciidoc['callout']
asciidoc['literal-block'].inside.rest = {
'callout': asciidoc['callout']
};

Prism.languages.asciidoc['table'].inside.rest = {
'comment-block': Prism.languages.asciidoc['comment-block'],
'passthrough-block': Prism.languages.asciidoc['passthrough-block'],
'literal-block': Prism.languages.asciidoc['literal-block'],
'other-block': Prism.languages.asciidoc['other-block'],
'list-punctuation': Prism.languages.asciidoc['list-punctuation'],
'indented-block': Prism.languages.asciidoc['indented-block'],
'comment': Prism.languages.asciidoc['comment'],
'title': Prism.languages.asciidoc['title'],
'attribute-entry': Prism.languages.asciidoc['attribute-entry'],
'attributes': Prism.languages.asciidoc['attributes'],
'hr': Prism.languages.asciidoc['hr'],
'page-break': Prism.languages.asciidoc['page-break'],
'admonition': Prism.languages.asciidoc['admonition'],
'list-label': Prism.languages.asciidoc['list-label'],
'callout': Prism.languages.asciidoc['callout'],
'macro': Prism.languages.asciidoc['macro'],
'inline': Prism.languages.asciidoc['inline'],
'replacement': Prism.languages.asciidoc['replacement'],
'entity': Prism.languages.asciidoc['entity'],
'line-continuation': Prism.languages.asciidoc['line-continuation']
asciidoc['table'].inside.rest = {
'comment-block': asciidoc['comment-block'],
'passthrough-block': asciidoc['passthrough-block'],
'literal-block': asciidoc['literal-block'],
'other-block': asciidoc['other-block'],
'list-punctuation': asciidoc['list-punctuation'],
'indented-block': asciidoc['indented-block'],
'comment': asciidoc['comment'],
'title': asciidoc['title'],
'attribute-entry': asciidoc['attribute-entry'],
'attributes': asciidoc['attributes'],
'hr': asciidoc['hr'],
'page-break': asciidoc['page-break'],
'admonition': asciidoc['admonition'],
'list-label': asciidoc['list-label'],
'callout': asciidoc['callout'],
'macro': asciidoc['macro'],
'inline': asciidoc['inline'],
'replacement': asciidoc['replacement'],
'entity': asciidoc['entity'],
'line-continuation': asciidoc['line-continuation']
};

Prism.languages.asciidoc['other-block'].inside.rest = {
'table': Prism.languages.asciidoc['table'],
'list-punctuation': Prism.languages.asciidoc['list-punctuation'],
'indented-block': Prism.languages.asciidoc['indented-block'],
'comment': Prism.languages.asciidoc['comment'],
'attribute-entry': Prism.languages.asciidoc['attribute-entry'],
'attributes': Prism.languages.asciidoc['attributes'],
'hr': Prism.languages.asciidoc['hr'],
'page-break': Prism.languages.asciidoc['page-break'],
'admonition': Prism.languages.asciidoc['admonition'],
'list-label': Prism.languages.asciidoc['list-label'],
'macro': Prism.languages.asciidoc['macro'],
'inline': Prism.languages.asciidoc['inline'],
'replacement': Prism.languages.asciidoc['replacement'],
'entity': Prism.languages.asciidoc['entity'],
'line-continuation': Prism.languages.asciidoc['line-continuation']
asciidoc['other-block'].inside.rest = {
'table': asciidoc['table'],
'list-punctuation': asciidoc['list-punctuation'],
'indented-block': asciidoc['indented-block'],
'comment': asciidoc['comment'],
'attribute-entry': asciidoc['attribute-entry'],
'attributes': asciidoc['attributes'],
'hr': asciidoc['hr'],
'page-break': asciidoc['page-break'],
'admonition': asciidoc['admonition'],
'list-label': asciidoc['list-label'],
'macro': asciidoc['macro'],
'inline': asciidoc['inline'],
'replacement': asciidoc['replacement'],
'entity': asciidoc['entity'],
'line-continuation': asciidoc['line-continuation']
};

Prism.languages.asciidoc['title'].inside.rest = {
'macro': Prism.languages.asciidoc['macro'],
'inline': Prism.languages.asciidoc['inline'],
'replacement': Prism.languages.asciidoc['replacement'],
'entity': Prism.languages.asciidoc['entity']
asciidoc['title'].inside.rest = {
'macro': asciidoc['macro'],
'inline': asciidoc['inline'],
'replacement': asciidoc['replacement'],
'entity': asciidoc['entity']
};

// Plugin to make entity title show the real entity, idea by Roman Komarov
Expand All @@ -268,4 +270,4 @@
env.attributes['title'] = env.content.replace(/&/, '&');
}
});
}(Prism));
}(Prism));
2 changes: 1 addition & 1 deletion components/prism-asciidoc.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading