-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
highlightAuto
with language subset doesn't appear to be working
#1868
Comments
Hi @Martii highlight: function (aCode, aLang) {
var obj = null;
var lang = [ // NOTE: More likely to less likely
'javascript', 'xpath', 'xml', // <------- remove xpath
'css', 'less', 'scss',
'json',
'diff',
'shell',
'bash', 'dos',
'vbscript'
]; In 9.12 this fact was silently ignored, but now we throw an error. Probably we should not. |
That did the trick. Will push to dev. Thank you! Could have sworn that I validated all the language names but I'm only human. ;) :)
Looks like I'll need to add a few more dev console messages to track this. :) Good to know. Thanks a bazillion! |
Hmm just trapped on local dev and nothing thrown. :\ Oh well... I'm ready for rest and will tackle our issue later. |
Okay I'm stubborn... trapped every layer of our code, and several hard refreshes of my browser, and got this: TypeError: Cannot read property 'disableAutodetect' of undefined
at autoDetection (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/highlight.js/lib/highlight.js:711:29)
at Array.filter (<anonymous>)
at Object.highlightAuto (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/highlight.js/lib/highlight.js:572:40)
at Object.highlight (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/libs/markdown.js:261:21)
at Renderer.code (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/marked/lib/marked.js:920:28)
at Parser.tok (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/marked/lib/marked.js:1199:28)
at Parser.parse (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/marked/lib/marked.js:1144:17)
at Function.Parser.parse (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/marked/lib/marked.js:1126:17)
at marked (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/marked/lib/marked.js:1533:19)
at exports.renderMd (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/libs/markdown.js:285:10)
at exports.renderComment (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/libs/modelParser.js:719:30)
at Function._.map._.collect (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/underscore/underscore.js:205:24)
at preRender (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/controllers/issue.js:240:13)
at asyncComplete (~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/controllers/issue.js:254:11)
at ~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/async/dist/async.js:3888:9
at ~/repo/git/OpenUserJS.org/martii/OpenUserJS.org/node_modules/async/dist/async.js:473:16 ... that's not quite the stack trace I was thinking I was going to get... Anyhow... removing the |
There should be... it's listed at the tail end of https://github.com/highlightjs/highlight.js/blob/82c22c6da9f591510f041d2047c0a5b7e9886370/docs/css-classes-reference.rst#language-names-and-aliases. See I'm going to reopen this as this is darn peculiar. |
Ah, I see. It doesn't accept aliases (and never did), so use |
* Add in some dev console messages to assist Post OpenUserJS#1528 OpenUserJS#1438 ; Applies to OpenUserJS#430 ; See also highlightjs/highlight.js#1868
* Add in some dev console messages to assist Post #1528 #1438 ; Applies to #430 ; See also highlightjs/highlight.js#1868 Auto-merge
I'm wrong, sorry for the buzz. That's my bug :( Will fix it. |
Add default non-aliased language as the first item for XQuery to match the rest of the doc. e.g. `xquery` Post highlightjs#1868
Add default non-aliased language as the first item for XQuery to match the rest of the doc. e.g. `xquery` Post #1868
* Please read their CHANGELOGs * Revert back to alias from OpenUserJS#1529 for Code readability now that it is fixed; See also highlightjs/highlight.js#1868 * Delete op retested
* Please read their CHANGELOGs * Revert back to alias from #1529 for Code readability now that it is fixed; See also highlightjs/highlight.js#1868 * Delete op retested Auto-merge
Hello,
Re:
0651014
/docs/api.rst#highlightautovalue-languagesubset (we use this... and thank you and your team for the longevity and expertise with this package :)b9cfc7f
(Dep upgrade from highlight.js@9.12.0 to highlight.js@9.13.0)c5cb49c
/libs/markdown.js#L225-L260 (our code where it currently works in highlight.js@9.12.0 but not highlight.js@9.13.0 which is currently on production. Using a limited Array of Strings.)Spec:
NOTES:
Thanks for the look.
The text was updated successfully, but these errors were encountered: