curly quotes break rendering

Chris Bartley's Avatar

Chris Bartley

18 Feb, 2021 06:04 PM

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

Whenever I have a curly quote (“ or ”) in my markdown, Marked refuses to render anything when I open the doc--I just get a blank document. If Marked is already open and displaying the document I'm editing, and I add a curly quote, then it either spins for a bit and does nothing, or gives me an error saying it's an unrecognized file type.

I get it that curly quotes make it not plain text, but it'd be great if Marked could still try to render everything else and replace problematic characters with some placeholder icon so I could more easily find the problem. As it is, if I don't immediately know where the problem character is (e.g. when pasting in a bunch of text), I end up having to binary search. Not a huge deal, just a little annoying.

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

  1. Create a markdown doc with a curly quote in it (“ or ”)
  2. Open in Marked

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

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

macOS Version: 11.2.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: YES
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
useCustomPreprocessor: NO
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on 19 Feb, 2021 12:01 AM

    Brett's Avatar

    Under neither built-in processor should this be an issue. I tested curly
    quotes in both the Discount and MultiMarkdown processor and they
    rendered fine, just as you would expect. Your sample document, however,
    does not contain curly quotes by any ascii standard. What editor created
    this file, and what language do you usually work in?

    If I open it in Sublime Text, I see `It has Òcurly quotesÓ.`. If I
    open it in MultiMarkdown Composer, it's in what appears to be Japanese.


  2. 2 Posted by Chris Bartley on 19 Feb, 2021 02:02 AM

    Chris Bartley's Avatar

    Ah! Interesting! I only have the problem when creating with IntelliJ IDEA. If I create in TextEdit, it opens in Marked just fine. I've attached a zip with two test files--one created in IntelliJ IDEA, the other in TextEdit. I copied the curly quotes from here:

    Double-clicking the one created in IntelliJ causes Marked to give the error. Double-clicking the one created in TextEdit opens in Marked just fine.

    I use Marked's GitHub processor exclusively.

    Also, FWIW, using TextEdit to open the one created in IntelliJ renders the curly quotes just as expected. No Japanese or whatnot.


  3. Support Staff 3 Posted by Brett on 19 Feb, 2021 11:39 AM

    Brett's Avatar

    Can you tell IntelliJ to use UTF-8 encoding?

    - 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

  • 45 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


? 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