Files containing Critic Markup fail to be displayed in Marked

David Bertenshaw's Avatar

David Bertenshaw

06 Mar, 2023 06:02 PM

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

Any file containg critic markup syntax will fail to display in the latest version of Marked 2 (MAS). It appears the content is there, as the word count is displayed accurately, but I can’t find any way of displaying anything in the Window. Exactly the same file without the critic markup will display perfectly.

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

  1. Create a simple file with any critic markup
  2. Open it in Marked 2 – nothing is displayed though the content is counted for word count
  3. Remove the the critic markup from the same file
  4. It will now display the content perfectly.

NB: BBEdit and DT3 both preview the critic markup file perfectly.

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

The file is minimal, but please see the attached screenshots of the same file with and without critic markup (the three windows are from top to bottom are BBEdit, BBEdit Preview and Marked 2).

Thanks!

// Configuration (do not edit) Marked 2 1040 (Mac App Store)

macOS Version: 13.2.1

additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: YES
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: YES
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 0
defaultProcessor: MultiMarkdown
enableMiniMap: YES
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: YES
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: YES
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: YES
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on 06 Nov, 2023 07:39 PM

    Brett's Avatar

    As reported on the BrettTerpstra.com forums there's now a fix for this. I'll be publishing the release tomorrow and it will hopefully be available for all update channels within 72 hours.

  2. 2 Posted by David Bertensha... on 06 Nov, 2023 07:43 PM

    David Bertenshaw's Avatar

    Hi Brett,

    Thanks for this! I posted on the forum thread that I'd tried out your temporary fix successfully, so I look forward to the 'official' version!

    Many thanks,

    David

  3. 3 Posted by sealfur on 31 Jul, 2024 06:19 AM

    sealfur's Avatar

    Several months later and I still am having this problem. It makes me sad.

  4. Support Staff 4 Posted by Brett on 11 Aug, 2024 12:58 PM

    Brett's Avatar

    Are you on the latest version?

  5. 5 Posted by sealfur on 12 Aug, 2024 05:13 AM

    sealfur's Avatar

    Valid question. I’m told I am on the latest version.

    Marked 2 2.6.44 is currently the newest version available.

    I attached a screenshot of my “update” modal.

    I also attached the file I’m using to test it.

    And, also, you might want the configuration log:

    // Configuration (do not edit)
    Marked 2 1067 (Direct)
    macOS Version: 13.6.8
    ---
    additionalMathJaxConfig: 
    allowPageBreakInCode: YES
    bookTxtIsLeanpub: NO
    summaryMdIsGitBook: NO
    codeIsPoetry: NO
    codeCanWrap: YES
    collapsibleHeadlines: YES
    convertGithubCheckboxes: YES
    convertGithubEmoji: YES
    convertYAMLToMMD: YES
    defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
    defaultPreviewStyle: 6
    defaultProcessor: MultiMarkdown
    enableMiniMap: YES
    excludeBlockQuotesFromCounts: NO
    excludeFootnotesFromCounts: YES
    excludeVerbatimFromCounts: YES
    excludeCaptionsFromCounts: NO
    folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
    githubNewlines: NO
    h1IsPageBreak: NO
    h2IsPageBreak: NO
    hrIsPageBreak: YES
    includeMathJax: NO
    includeKatex: YES
    limitTextWidth: NO
    mathNumberEquations: YES
    mathNumberEquationsSide: 0
    mathNumberEquationsAMSOnly: NO
    minimalJavaScript: YES
    outlineModeExtensions: 
    permissionGranted: YES
    printHeaderBottomLeft: %date %time
    printHeaderBottomRight: %page of %total
    printHeaderFirstPage: NO
    printFooterFirstPage: YES
    printHeaderTopLeft: 
    printHeaderTopRight: 
    processHTMLFiles: NO
    removeMetadataForPreview: NO
    removeYAMLHeaders: NO
    scrollToEdit: YES
    shouldDetectCritic: YES
    shouldHighlightMarkupErrors: YES
    shouldLoadCritic: NO
    syntaxHighlight: YES
    syntaxHighlightOnlyLang: YES
    useCustomMarkdownProcessor: NO
    customMarkdownProcessor: 
    useCustomPreprocessor: NO
    customPreprocessor: 
    useFirstH1AsPrintTitle: YES
    
  6. Support Staff 6 Posted by Brett on 12 Aug, 2024 02:20 PM

    Brett's Avatar

    What happens if you open Terminal and type which python or which python3?

  7. 7 Posted by sealfur on 13 Aug, 2024 12:09 PM

    sealfur's Avatar
    > ~ which python
    python not found
    
    > ~ which python3
    /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
    
  8. Support Staff 8 Posted by Brett on 13 Aug, 2024 12:12 PM

    Brett's Avatar

    Try running:

    ln -s /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
    /usr/local/bin/python3

    Marked currently looks for Python v2 in the Frameworks as it had never
    been updated to v3. That's interesting. But if you can get a symlink
    (above command) into /usr/local/bin, it should work for you.

    In the meantime I've converted the script to a Ruby script and left
    Python behind for this purpose. If the above doesn't solve it for you,
    the next release might.

    -Brett

    On 13 Aug 2024, at 7:09, gentle.gift5925 wrote:

  9. 9 Posted by sealfur on 13 Aug, 2024 01:07 PM

    sealfur's Avatar

    Thanks for your speedy reply. Sadly it didn’t work, and I can continue to wait.

    It’s so weird, though. The word count still updates, which means some part of it knows that the content is there. But the html just doesn’t render inside the div#wrapper.criticmarkup and there’s no ul inside div#generated-toc .

    When I turn off Process CriticMarkup the content is all visible inside div#wrapper and I can see the list inside div#generated-toc.

    I can help you write a strongly worded letter to the parents/guardians of Python v3, but it seems you’ve already chosen to invest your time in this Ruby kid instead.


    <aside> This reply form on the support site reads:

    If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

    I have two points relevant to this:

    1. I believe I do have an account, but I still have to answer the question.
    2. As a human and not a machine, I am aware that the sky is not always the same colour but have never been game to try a different answer to the one I know gets my comments posted.</aside>
  10. Support Staff 10 Posted by Brett on 13 Aug, 2024 02:02 PM

    Brett's Avatar

    > Thanks for your speedy reply. Sadly it didn’t work, and I can
    > continue to wait.

    Sorry to hear that. Does `/usr/local/bin/python3 --version` give you
    appropriate version output? Python is used in other areas of Marked
    (such as Scrivener compiling) and if you're game to help me narrow down
    the issue, I'd like to pursue it a little bit.

    > It’s so weird, though. The word count still updates, which means
    > some part of it knows that the content is there. But the html just
    > doesn’t render inside the `div#wrapper.criticmarkup` and there’s
    > no `ul` inside `div#generated-toc` .

    Yeah, the word counting and other features fully parse before sending
    the marked up document out to the criticmarkup script. That script is
    returning a blank response, so while most features appear to be
    functioning, the final HTML output is being blanked out.

    > 1. I believe I do have an account, but I still have to answer the
    > question.

    I'll have to look into this. The platform of this support site is long
    in the tooth and poorly updated/supported, but moving to something more
    modern means erasing the history of all questions asked and answered
    already, so I've been hesitant to do so. If you ever want to, you can
    also post questions/bugs in the Marked category of
    https://forum.brettterpstra.com. That runs on Discourse and is actively
    developed :).

    On 13 Aug 2024, at 8:07, sealfur wrote:

  11. 11 Posted by sealfur on 14 Aug, 2024 06:06 AM

    sealfur's Avatar

    Sorry to hear that. Does /usr/local/bin/python3 --version give you appropriate version output?

    It does.

    ➜  ~ /usr/local/bin/python3 --version
    Python 3.12.3
    

    and if you're game to help me narrow down the issue, I'd like to pursue it a little bit.

    I am. These are the problems I like diving into, even if I don’t fully understand them. Let me know what you’d like me to try.

    If you ever want to, you can also post questions/bugs in the Marked category of https://forum.brettterpstra.com.

    Thanks. I’ve created an account there under Sealfur. Very happy for you to move this conversation over there for the extra digging.

    Josh

    On Wed, 14 Aug 2024, at 00:02, Brett wrote:

  12. Support Staff 12 Posted by Brett on 14 Aug, 2024 10:17 AM

    Brett's Avatar

    Started a new conversation on the forum.

    On 14 Aug 2024, at 1:06, sealfur wrote:

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • Screenshot_2023-03-06_at_17.52.26.png 421 KB
  • Screenshot_2023-03-06_at_17.52.52.png 483 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