Preview render correct; HTML output isn't

Bob Edmison's Avatar

Bob Edmison

05 Jan, 2023 09:27 PM

I have a markdown page that has Kotlin code in it. I've fenced the code with:

 <some code>
The markdown renders correctly in Marked, but when I use the output to HTML save option, the resulting HTML page displays the fencing and unformatted code. I have verified there aren&#39;t any stray backticks. 

  1. 1 Posted by Bob Edmison on 05 Jan, 2023 09:29 PM

    Bob Edmison's Avatar

    And my post was munged. Corrected:
    I have some kotlin code fenced thusly:
        <some code>
    The markdown renders correctly in Marked, but when I use the output to HTML save option, the resulting HTML page displays the fencing and unformatted code. I have verified there aren't any stray backticks.


  2. 2 Posted by Bob Edmison on 05 Jan, 2023 09:39 PM

    Bob Edmison's Avatar

    Digging into this, I don't think this is an issue with the output style. Other builtin output forms (ie Amblin) exhibit the same issue.

    Source and output files attached.

  3. Support Staff 3 Posted by Brett on 05 Jan, 2023 10:04 PM

    Brett's Avatar

    I'm able to output correct HTML without issue from your Markdown file. What method are you using to export the HTML? Like what steps do you take, just so I can be sure I'm replicating exactly.

    Also, please go to Help->Report an Issue and copy the contents of that field into your response.


  4. 4 Posted by Bob Edmison on 06 Jan, 2023 04:04 PM

    Bob Edmison's Avatar

    Thanks for getting back to me. Within the Marked window, I go to lower right, click the arrow, then click the HTML option. The save options for HTML are set as:

    Include style in output : GitHub
    Include Highlighting JS
    Don’t include MathJax
    Don’t Embed local images
    Reveal in finder after save

    and then click the save button.

    // Configuration (do not edit)
    Marked 2 1035 (Setapp)
    macOS Version: 12.6.1
    allowPageBreakInCode: YES
    bookTxtIsLeanpub: NO
    summaryMdIsGitBook: NO
    codeIsPoetry: NO
    codeCanWrap: YES
    collapsibleHeadlines: NO
    convertGithubCheckboxes: YES
    convertGithubEmoji: YES
    convertYAMLToMMD: NO
    defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
    defaultPreviewStyle: 3
    defaultProcessor: Discount (GFM)
    enableMiniMap: NO
    excludeBlockQuotesFromCounts: NO
    excludeFootnotesFromCounts: NO
    excludeVerbatimFromCounts: NO
    excludeCaptionsFromCounts: NO
    folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
    githubNewlines: YES
    h1IsPageBreak: NO
    h2IsPageBreak: NO
    hrIsPageBreak: NO
    includeMathJax: YES
    includeKatex: NO
    limitTextWidth: NO
    mathNumberEquations: NO
    mathNumberEquationsSide: 0
    mathNumberEquationsAMSOnly: NO
    minimalJavaScript: NO
    permissionGranted: NO
    printHeaderFirstPage: NO
    printFooterFirstPage: NO
    processHTMLFiles: YES
    removeMetadataForPreview: NO
    removeYAMLHeaders: NO
    scrollToEdit: YES
    shouldDetectCritic: YES
    shouldHighlightMarkupErrors: NO
    shouldLoadCritic: NO
    syntaxHighlight: YES
    syntaxHighlightOnlyLang: NO
    useCustomMarkdownProcessor: NO
    useCustomPreprocessor: NO
    useFirstH1AsPrintTitle: YES

  5. Support Staff 5 Posted by Brett on 06 Jan, 2023 04:20 PM

    Brett's Avatar

    It works fine for me with your settings, so I'm a bit puzzled. What gets saved as HTML runs through the same processes as what's displayed in the preview, for the most part.

    Out of curiosity, if you switch to MultiMarkdown in Preferences->Processor, do you have any better luck with the export?


  6. 6 Posted by Bob Edmison on 06 Jan, 2023 09:58 PM

    Bob Edmison's Avatar

    Same result, but then I unchecked the "Track CSS Changes" option in the style pref pane (not sure how it got checked), and it started working,

    So, crisis averted. Thanks.

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


? 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