-
Notifications
You must be signed in to change notification settings - Fork 76
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
Provide ability to disable prettify code highlighting #64
Conversation
@@ -65,5 +65,8 @@ abstract class StyledVerbatimSerializer extends VerbatimSerializer { | |||
*/ | |||
object PrettifyVerbatimSerializer extends StyledVerbatimSerializer { | |||
override def printPreAttributes(printer: Printer): Unit = printClass(printer, "prettyprint") | |||
override def printCodeAttributes(printer: Printer, nodeType: String): Unit = printClass(printer, s"language-$nodeType") | |||
override def printCodeAttributes(printer: Printer, nodeType: String): Unit = nodeType match { | |||
case "nocode" => printClass(printer, s"nocode") |
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.
Prettify uses nocode
, I am open to suggestions for a better name.
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.
How about:
```text
foo
```
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.
Prettify will still try to highlight it. nocode
is the only way to turn off this behaviour.
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 we pass "nocode" to Prettify when the user types in ```text
in addition to nocode
?
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.
ddcb30b
to
5de755c
Compare
Updated to both map The alternative would be to always add the |
Either using: ```text ... ``` or for snippets: @@ snip [apache.log](apache.log) { type=text }
Rebased and added notes entry |
This at least is where we can mirror and match GHM, so we should pick On Mon, 21 Nov 2016, 20:12 Jonas Fonseca, notifications@github.com wrote:
|
@dwijnand I'm guessing that Kramdown / Redcarpet or whatever that implements GFM uses https://help.github.com/articles/creating-and-highlighting-code-blocks/ |
Linguist I believe is the tool to categorise languages and I assumed it had On Mon, 21 Nov 2016, 21:54 eugene yokota, notifications@github.com wrote:
|
In addition to the per-snippet solution proposed here I think it'd be great if paradox also offered a way to completely disable the existing strong coupling with google-code-prettify. In my project for example we use IMHO paradox should offer an SBT setting that allows users to completely switch off any generation-time highlighting support. |
Either using:
or for snippets:
As discussed in lightbend/ssl-config#51 Paradox will eagerly highlight anything inside fenched code block. This PR provides an escape hatch for this behaviour.