-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
+ support for multi-language 3rd-party packages #2336
+ support for multi-language 3rd-party packages #2336
Conversation
Requires highlightjs/highlight.js#2336 to build. TODO: harmonize URL productions between the three modules. harmonize classNames between the three modules.
If the build is working then just running the full test suite should ALSO test your submodules. Is that not what you're seeing? |
Oh wait this is a PR lol.... :-) Let me take a closer look. |
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.
See my two comments and tell me I'm not crazy. :-) Otherwise this looks pretty good and about what I'd expect.
test/detect/index.js
Outdated
@@ -34,7 +34,7 @@ function testAutoDetection(language, {detectPath}) { | |||
|
|||
describe('hljs.highlightAuto()', () => { | |||
before( async function() { | |||
let thirdPartyLanguages = await getThirdPartyLanguages(); | |||
let thirdPartyPackages = await getThirdPartyPackages(); // !! not used |
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.
It's used on line 49. listLanguages
in the build already knows the FULL language list. We only need to figure out where the tests are at.
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.
oops, was being blind
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.
Can you remove the not used comments?
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.
done.
Oh cool, the code snippit gets an [Outdated] annotation above it!
tools/lib/language.js
Outdated
@@ -9,7 +9,7 @@ const REQUIRES_REGEX = /\/\*.*?Requires: (.*?)\n/s | |||
const CATEGORY_REGEX = /\/\*.*?Category: (.*?)\n/s | |||
const LANGUAGE_REGEX = /\/\*.*?Language: (.*?)\n/s | |||
const {rollupCode} = require("./bundling.js") | |||
const { getThirdPartyLanguages } = require("./external_language") | |||
const { getThirdPartyPackages } = require("./external_language") // !! not used |
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.
Used on line 101.
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.
here too
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.
done
Maybe look at your one failing test though:
|
i've been unable to run the tests; |
You need a node build:
|
Weak. b0rk something there, didn't I?
ends with yaml and shexc an passes 482.
passes 293, fails:
This isn't the same error you got. Do you think I've screwed something up here? |
e7fb0a3
to
f7821bd
Compare
tested with: node ./tools/build.js -t all plaintext node ./tools/build.js -t all plaintext shexc solidity sparql ttl not tested for with test/detect or test/markup tests ('cause I don't know how).
Just FYI when you force push it's harder to review what you've changed... |
f7821bd
to
d41df87
Compare
highlightjs#2336 (comment) actually two errors: 1 autodetection codepath can return null for non-extra packages 2 'highlight() markup'::before wasn't finished TODO: hljs.highlightAuto()
Re
, I'd not noticed this in the top of function testAutoDetection(language, {detectPath}) {
const languagePath = detectPath || utility.buildPath('detect', language); For all of the non-
Oops, just pushed one I'd committed this AM. I've stopped generating them, though. (I can squash just before merge if you want.) |
should pass all tests with the |
Ok, that's fine. Though I don't much mind undefined being stand-in, could be my Ruby roots where we just have a single nil value.
No need, GitHub does that automatically if I want.
LOL. I can't wait until people start making PRs that change our code because their tests are failing in their 3rd party grammar, but perhaps that's just a bad dream. :) |
Requires highlightjs/highlight.js#2336 to build. TODO: harmonize URL productions between the three modules. harmonize classNames between the three modules.
* + support for multi-language 3rd-party packages
* + support for multi-language 3rd-party packages
* + support for multi-language 3rd-party packages
* + support for multi-language 3rd-party packages
tested with:
node ./tools/build.js -t all plaintext
node ./tools/build.js -t all plaintext shexc solidity sparql ttl
not tested for with test/detect or test/markup tests ('cause I don't
know how).