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 trivial lexer for output (using Token.Generic.Output for the complete code block) #1835
Milestone
Comments
Sounds good, it should be very similar to the TextLexer. But don't give it a priority, please. It should only be used when explicitly requested. |
Done: #1836 |
wmfgerrit
pushed a commit
to wikimedia/mediawiki-extensions-SyntaxHighlight_GeSHi
that referenced
this issue
Sep 1, 2021
New lexers include ansys, apdl, asc, gcode, gsql, jslt, julia-repl, kuin, meson, nestedtext, nodejsrepl, nt, omg-idl, output, pem, procfile, pwsh, smithy, teal, thingsdb, ti, wast, wat. Also "golang" is now an accepted alias for go. The output lexer is a generic lexer that just makes everything look like output, see <pygments/pygments#1835>. Full upstream changelogs: * https://github.com/pygments/pygments/releases/tag/2.10.0 * https://github.com/pygments/pygments/releases/tag/2.9.0 * https://github.com/pygments/pygments/releases/tag/2.8.1 Bug: T280117 Change-Id: I162dff1e3f3eb6f01e87dc09509b508f52aff46c
wmfgerrit
pushed a commit
to wikimedia/mediawiki-extensions
that referenced
this issue
Sep 1, 2021
* Update SyntaxHighlight_GeSHi from branch 'master' to b4f53c7ad17c3438f187378652d083bc675dbe19 - Update Pygments to 2.10.0 New lexers include ansys, apdl, asc, gcode, gsql, jslt, julia-repl, kuin, meson, nestedtext, nodejsrepl, nt, omg-idl, output, pem, procfile, pwsh, smithy, teal, thingsdb, ti, wast, wat. Also "golang" is now an accepted alias for go. The output lexer is a generic lexer that just makes everything look like output, see <pygments/pygments#1835>. Full upstream changelogs: * https://github.com/pygments/pygments/releases/tag/2.10.0 * https://github.com/pygments/pygments/releases/tag/2.9.0 * https://github.com/pygments/pygments/releases/tag/2.8.1 Bug: T280117 Change-Id: I162dff1e3f3eb6f01e87dc09509b508f52aff46c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have the following Sphinx source:
the output in the first code snippet is marked up with
Token.Generic.Output
, but the output of the second code snippet is marked up withToken.Text
(in fact it isn't marked up at all).In my current style the result looks like this:
i.e. both outputs look different. I could of course use the
console
lexer for the second output and hope that the lexer doesn't find anything that it will interpret as a prompt. The better solution however would be to have a new lexer that simply outputs everything marked up with the tokenToken.Generic.Output
.Code for that might look something like this:
If this is accepted I can work on a pull request implementing
OutputLexer
.The text was updated successfully, but these errors were encountered: