GFM opening codeblock not recognized

Tim Osborn's Avatar

Tim Osborn

22 May, 2018 02:06 AM

// Please enter a detailed description of the issue // Description of the issue:

github flavoured markdown not highlighting correctly - opening codeblock is not recognized, so all subsequent codeblocks are borked / 'out of phase'

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. save test.md with content
    ```json filename.json []
    2. render using default guthub style
    

// If applicable please attach a sample document that causes the issue for you.

https://github.com/prebid/Prebid.js/blob/master/README.md

see:

```json modules.json

// Configuration (do not edit) Marked 2 948 (Direct)

macOS Version: 10.12.6

additionalMathJaxConfig: allowPageBreakInCode: TRUE bookTxtIsLeanpub: TRUE summaryMdIsGitBook: TRUE codeIsPoetry: TRUE codeCanWrap: TRUE collapsibleHeadlines: TRUE convertGithubCheckboxes: TRUE convertYAMLToMMD: TRUE defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML defaultPreviewStyle: 3 defaultProcessor: Discount (GFM) enableMiniMap: TRUE excludeBlockQuotesFromCounts: TRUE excludeFootnotesFromCounts: TRUE excludeVerbatimFromCounts: TRUE excludeCaptionsFromCounts: TRUE folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml githubNewlines: TRUE h1IsPageBreak: TRUE h2IsPageBreak: TRUE hrIsPageBreak: TRUE includeMathJax: TRUE limitTextWidth: TRUE minimalJavaScript: TRUE outlineModeExtensions: permissionGranted: TRUE printHeaderBottomLeft: printHeaderBottomRight: printHeaderFirstPage: TRUE printFooterFirstPage: TRUE printHeaderTopLeft: printHeaderTopRight: processHTMLFiles: TRUE removeMetadataForPreview: TRUE removeYAMLHeaders: TRUE scrollToEdit: TRUE shouldDetectCritic: TRUE shouldHighlightMarkupErrors: TRUE shouldLoadCritic: TRUE syntaxHighlight: TRUE

  1. Support Staff 1 Posted by Brett on 22 May, 2018 03:08 AM

    Brett's Avatar

    Marked's renderer currently expects a language specifier after the
    backticks to be a string of characters with no spaces, so the filename
    after the language breaks it. Changing "json modules.json" to "json"
    will allow proper rendering.

    This is something I'm already working on fixing, so it's just a
    temporary workaround.

    Thanks,
    Brett

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • marked.md 166 Bytes

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