We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JS code should be highlighted properly
JS code is brokan
Try to format this javascript with prism:
$.terminal.defaults.formatters.push(function(string) { return string.replace(/([^`]|^)`([^`]+)`([^`]|$)/g, '$1[[b;#fff;]$2]$3'); });
it's part of chat.js on terminal website. (formatting of text inside back ticks).
chat.js
You can see this with less command with this demo https://codepen.io/jcubic/pen/zEyxjJ
and type:
less https://terminal.jcubic.pl/js/chat.js
The text was updated successfully, but these errors were encountered:
The problem is in Prism
this works:
term.echo($.terminal.prism('javascript', '/xxx`xx`yyy/'))
but this is broken:
$.get('https://terminal.jcubic.pl/js/chat.js').then((text) => { term.echo($.terminal.prism('javascript', text)); });
Sorry, something went wrong.
This is also broken, (this should be tested):
$.get('https://terminal.jcubic.pl/js/chat.js').then((text) => { term.echo($.terminal.prism('javascript', $.terminal.escape_brackets(text))); });
Not sure if you can make formatters in source code work with prism (such meta).
fixed in #410 by 17d903f
There is one not related issue with wrapping though.
fix artifacts in wrapping in cmd found in #523
38a823b
No branches or pull requests
Expected behavior
JS code should be highlighted properly
Actual behavior
JS code is brokan
Steps to reproduce
Try to format this javascript with prism:
it's part of
chat.js
on terminal website. (formatting of text inside back ticks).You can see this with less command with this demo https://codepen.io/jcubic/pen/zEyxjJ
and type:
less https://terminal.jcubic.pl/js/chat.js
The text was updated successfully, but these errors were encountered: