-
-
Notifications
You must be signed in to change notification settings - Fork 170
add syntax highlighter plugin API and syntect plugin #194
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
add syntax highlighter plugin API and syntect plugin #194
Conversation
|
Hi, Daniel! Thank you so much for your submission. I am going to be a little busy in the earlier half of this week, but as soon as I get a chance, I will review this thoroughly. I will say now, though, this looks fantastic, and I'm excited to work with you to land these changes! ❤️ |
|
Thank you! In the meantime, I'll look into these build failures. |
|
In #166 you've said,
Are you sure, syntax highlighting should be enabled for the binary by default? Because if I'm not mistaken, the reason why the build is failing is that I've made syntax highlighting enabled by default for the CLI. |
|
Hiya! Sorry I haven't been around, I have been dealing with some health issues. I do think syntax highlighting should be enabled by default for the binary, although I also think we should make that depend on a As for CI, I think we should just alter CI to run the spec tests with syntax highlighting disabled! (i.e. pass |
|
Hi! No problem, I've been busy lately too. I've been thinking about altering the tests as well, but then in my opinion, each currently failing test case should have three versions: one with no syntax highlighting, and one with syntax highlighting by no extra CLI arguments (i.e. the default syntax highlighting), and one with choosing a different theme via CLI arguments. But these kind of tests wouldn't be very robust, because what if the color themes change over time? Since there are color codes in the output, that would mean, at least 82 (or 164, if both themes change) test cases should be altered just to update color codes, which sounds a bit tedious (although we can expect that themes wouldn't change too often within syntect). Should we go for no syntax highlighting only, or test syntax highlighting as well? Thank you, and wishing you all the best regarding the health issues! |
syntect is optional in the library (but defaults to on), and required in the binary until someone really wants a syntect-less comrak binary for some reason. Add CI to ensure building and testing without these default features does in fact work.
|
I think we are fine to not rigorously test syntect's output, and trust that syntect do that well enough themselves; we leave the specs as they are, pure CommonMark specs, and then the I'm aware you have asked for some extra care in seeing this through, but I have reviewed it thoroughly and I couldn't complain if I tried! I have made two small changes; a typo fix in 8468c60, and making This is good to go. Thank you very much! ❤️ |
Please, take some extra time reviewing this pull request as it is my very first code contribution to an open-source project. Any recommendation for improvements is very welcome.
--syntax-highlightingoption, or the highlighting can be disabled by providing--syntax-highlighting none.cmmodule currently is not using any plugin.