Code Fence Not Rendering COrrectly

Eric Johnson's Avatar

Eric Johnson

23 Aug, 2018 03:13 AM

// Please enter a detailed description of the issue // Description of the issue: Opened markdown file to export to HTML. The code fenses seem to not be not recognzing the language anymore, or keeping the word wraps.

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

  1. Use the following fence:
  • Save the changes to the buckets.yaml file and push the changes to the DM Infrastructure repository.

    cd ~/code/dm-infrastructure/
    git status
    git add templates/s3/buckets.yaml
    git commit -m "Security patch: W31 Public S3 bucket"
    git push origin master
    

    See renedred screenshot.

    RoleEcsWebAcceptance:
        Type: AWS::IAM::Role
        Metadata:
            cfn_nag:
                rules_to_suppress:
                - id: F3
                    reason: "This policy has been approved by security. EJ - 06152018."
                - id: W11
                    reason: "This policy has been approved by security. EJ - 06152018."
        Properties:
    ```

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

// Configuration (do not edit)
Marked 2 957 (Mac App Store)
macOS Version: 10.13.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: 0
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
syntaxHighlightOnlyLang: TRUE
  1. Support Staff 1 Posted by Brett on 23 Aug, 2018 12:33 PM

    Brett's Avatar

    If your pasted example is correct, the issue is that the indentation on
    the closing fence of the second code block is different from the opening
    fence. Outdent the closing fence to the beginning of line to match the
    opening and it should work fine.

    -Brett

  2. 2 Posted by Eric Johnson on 23 Aug, 2018 03:52 PM

    Eric Johnson's Avatar

    The code example didn't copy paste very well. My situation is a little more complicated than that as well. We have a main workbook that references a number of included .md files. Opening the included MD files directly shows the code snippets correctly (see new screenshot). Opening the main document, which includes the .md file does not show the code snippet correctly.

    Notice it includes the fenced language (bash), has no highlighting, and does not have the line breaks honored.

    I included a main.md and textconventions.md file for you to reproduce on your side.

    This used to work fine in an older version, and I'm under a bit of a time crunch to export this PDF. For short term, can you provide a link to the version that would have been live back in June so I can roll back?

  3. Support Staff 3 Posted by Brett on 23 Aug, 2018 04:16 PM

    Brett's Avatar

    Ok. Here's a link to 2.5.19 from June while I figure out what's going
    on:

    https://updates.marked2app.com/Marked2.5.19953.zip

    -Brett

  4. Support Staff 4 Posted by Brett on 23 Aug, 2018 04:24 PM

    Brett's Avatar

    Ok, solved the issue, the fix will be in the next update.

    Thanks,
    Brett

  5. 5 Posted by Eric Johnson on 23 Aug, 2018 05:13 PM

    Eric Johnson's Avatar

    Awesome, glad you were able to reproduce on your side. Thank you so much for the link & patch.

    Cheers!

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • Screen_Shot_2018-08-22_at_10.11.13_PM.png 170 KB
  • Screen_Shot_2018-08-22_at_10.12.50_PM.png 63.1 KB

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