-
Notifications
You must be signed in to change notification settings - Fork 318
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
update highlightjs to support more languages #185
update highlightjs to support more languages #185
Conversation
Pending: I still need to add test for set_codeblock_language/1 |
Thank you but let's not support other languages yet. :) People complained a lot about invalid markup the last time. If people want custom markup, they can inject their own highlight.js versoin. |
Sorry about the last bug Jose, I understand your concerns and how bad code might have been looking. But I think with the new changes, not including these languages doesn't solve anything. You can see the results in this test page, an the different test cases (no highlight, no language, language not supported): Please let me know what you think, so I can make the necessary changes if you still consider removing language support is the best option. |
Ok. I see, thanks! I think we should move this code somewhere else so we can test it easily. Also, I don't think we need to specially handle erlang or html/xml. :) |
I thought would be common, but .. it wouldn't be common to have erlang code in elixir (sorry maybe it is a silly question), I was thinking of putting that code somewhere, but I have no idea where. |
I think we could include it the ExDoc.Markdown.to_html function directly. What do you think? |
Sorry, i think i misundertood completely your previous two messages. that's why the random answer. |
Thank you! We just need a test now! ❤️ 💚 💙 💛 💜 |
<script>hljs.initHighlightingOnLoad();</script> | ||
<script type="text/javascript" charset="utf-8"> | ||
hljs.initHighlightingOnLoad(); | ||
// languages supported: 'bash', 'coffeescript', 'css', 'diff', 'elixir', 'erlang', 'erlang-repl', 'http', 'javascript', 'json', 'markdown', 'sql', 'xml' |
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.
We don't need to include the languages once again here and down below since we include them in the highlight.js script!
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 because i don't know where to put the information about the aliases.
We should add it to the documentation, or README.md, ... I 'm clueless where to add it to
/* languages supported and their aliases
bash, sh, zsh,
coffeescript, coffee, cson, iced,
css,
diff, patch,
elixir, iex,
erlang, erl,
erlang-repl,
http,
javascript, js,
json,
markdown, md, mkdown, mkd,
sql,
xml, html, xhtml, rss, atom, xsl, plist,
*/
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.
We could add to the README. Actually, a section about syntax highlighting and mentioning that we use highlight.js would be really welcome!
yes. please test as much as possible |
Everything looks nice at first sight. I got all excited thinking this was a fix to highlightjs/highlight.js#730 or highlightjs/highlight.js#707 😞 Boy we need those fixes! :) |
Oops, sorry. This conflicted with the other pull request from you I just merged. Please rebase this one and I will get it in right away! |
75273e0
to
a37835e
Compare
there you go |
update highlightjs to support more languages
❤️ 💚 💙 💛 💜 |
Thank you José! |
highlight.js has been updated
Pending Improvements: