Preview render correct; HTML output isn't
I have a markdown page that has Kotlin code in it. I've fenced the code with:
<some code> <pre><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. Suggestions?</code> </pre>
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
1 Posted by Bob Edmison on 05 Jan, 2023 09:29 PM
And my post was munged. Corrected:
I have some kotlin code fenced thusly:
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 Posted by Bob Edmison on 05 Jan, 2023 09:39 PM
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.
Support Staff 3 Posted by Brett on 05 Jan, 2023 10:04 PM
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 Posted by Bob Edmison on 06 Jan, 2023 04:04 PM
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
defaultProcessor: Discount (GFM)
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
Support Staff 5 Posted by Brett on 06 Jan, 2023 04:20 PM
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 Posted by Bob Edmison on 06 Jan, 2023 09:58 PM
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.