-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the way all languages are registered to reveal.js
Fix code to correctly register languages to reveal.js, when loading from a browser. Add missing keywords to ATL.
- Loading branch information
Showing
5 changed files
with
132 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
module.exports = function(hljs) { | ||
hljs.registerLanguage('atl', require('./atl')); | ||
hljs.registerLanguage('ocl', require('./ocl')); | ||
hljs.registerLanguage('xcore', require('./xcore')); | ||
}; | ||
var hljsDefineOCL = require('./ocl') | ||
var hljsDefineATL = require('./atl') | ||
var hljsDefineXcore = require('./xcore') | ||
|
||
hljs.registerLanguage('ocl', hljsDefineOCL); | ||
hljs.registerLanguage('atl', hljsDefineATL); | ||
hljs.registerLanguage('xcore', hljsDefineXcore); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ module.exports = function(hljs) { | |
hljs.COMMENT('--', '$') | ||
] | ||
} | ||
}; | ||
}; |
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume your doing this yourself because you wanted one file instead of 3?
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yyyc514 I'm sorry, I don't understand your question.
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Highlight.js will build individual files for you automatically.
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware. Is there a pointer for the doc that explains the subprojects building process?
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/yyyc514/highlight.js/tree/squash_build_pipeline/extra
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm waiting for some other PRs to get reviewed first and then this will be merged into the master branch. (although the distributable it builds will work in any case).
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The text is somewhat confusing for me. As I understand, I should:
highlight.js/extra
folder.Is it correct?
Once the distributable file is created, what should I do? Will it be distributed along with hightlight.js, or should I find another way to distribute it?
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You add it to your git project, in the dist folder where it’s created. That’s the idea. Or you can distribute it however you want. It’s just a convention to make finding the distributable easier for those who only need the file.
1604463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe see my last thoughts here: highlightjs/highlight.js#2328