Syntax highlighting should be less intrusive

John's Avatar

John

11 Aug, 2017 04:35 PM

Github does the correct thing here, I believe, and I'd like you to consider similar behavior for Marked 2.

Syntax highlighting, even when enabled, should not happen on all code blocks.

Github only turns it on when you specify the language. If there's no language, there's no highlighting. This way you can have a mixed file of code and CLI examples, and only highlight the code.

Marked 2 does indeed allow you to disable backtick blocks using the "text" keyword, but that isn't necessary for Github files, and it doesn't help with 4-space indented lines. Now I have to convert my 4-space indented lines, particularly useful for single-line CLI examples, to backtick blocks if I want to export from Marked 2.

  1. Support Staff 1 Posted by Brett on 14 Aug, 2017 06:19 PM

    Brett's Avatar

    I think this is a valid point. Since changing this would disrupt the
    workflows of all current users (no one has ever reported this as an
    issue before), if I make the change it will be added as an option under
    the syntax highlighting in the Style preferences.

    It won't make it into this update, but I'll put it on the list.

    Thanks,
    Brett

  2. 2 Posted by John Daily on 15 Aug, 2017 01:21 AM

    John Daily's Avatar

    Absolutely, I agree it would be a bad idea to change the default behavior.

    Thanks for taking the report seriously, and thanks for making time for the feature (eventually).

    -John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac