Blank previews with CriticMarkup

I love being able to turn to Marked to preview markdown files from any of the various apps I use to make them (including nvUltra, MMD Composer 5, NotePlan and more).

But lately I’ve had a real problem: As soon as I turn on CriticMarkup processing in Marked, the Marked preview of the document goes blank. No idea if it’s my files, Marked, something I did wrong in the settings, etc.

Any thoughts on how to troubleshoot? Thanks!

I’m working with a user on the support site who’s reporting the same thing. It’s working fine for me locally and I haven’t been able to track down the issue yet. Which version of Marked are you on, Paddle, Setapp, or Mac App Store?

I’m using MacOS 12.7 on a 2020 M1 MacBook Air

I think I’m using the MAS version (no check-for-updates option in the menus). Happy to switch (to Paddle, not on SetApp) if that’s easier to troubleshoot on your end, or just to see if the problem persists.

Also happy to switch to the support site if you’d rather not have to bounce back and forth.

No, I actually want to try this for support, considering moving the whole support site over here. Would save money and might actually make for better support. So you’re helping me test it out :).

The reason I ask about the version is I’d like you to run a command in Terminal. Create a test file that contains CriticMarkup syntax, save it to your desktop as critictest.md, and then open Terminal and run:

cat ~/Desktop/critictest.md | /Applications/Marked\ 2.app/Contents/Resources/markedcritic.py

Note the backslash before the 2 in Marked\ 2. Let me know if you get a result from that. If not, run which python and which python3 from the command line and let me know what each returns.

I guess the first question should have been, have you installed the command line tools? I believe Python was removed from the default install around macOS 11, and Marked’s CriticMarkup handling requires it, so you do have to manually install the Command Line Tools to get it working.

https://www.freecodecamp.org/news/install-xcode-command-line-tools/

Sorry – been a busy few days.

I do have python installed and use it regularly (via Anaconda). I believe I have the developer tools installed.

I saved the critictest.md file to the desktop and ran the command. I got the plaintext of the file in terminal.

when you say plain text, do you mean with the CriticMarkup rendered?

Can you share a copy of critictest.md for me? I don’t know if file attachments work here or not yet…

I don’t see a way to upload the file (tried dropping the file on the editor but the site says I can only upload “jpg, jpeg, png, gif, heic, heif, webp, avif”). Here’s the contents; the filename is critictest.md and it’s on my desktop:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {>>commenting: labore et dolore magna aliqua<<}. Libero enim sed faucibus turpis in eu mi bibendum neque. Turpis massa sed elementum tempus egestas sed sed. Id semper risus in hendrerit gravida rutrum quisque non. Aenean pharetra magna ac placerat vestibulum lectus mauris ultrices eros. {--Cras semper auctor neque--} vitae tempus quam pellentesque. In nisl nisi scelerisque eu. Commodo nulla facilisi nullam vehicula ipsum. Volutpat consequat mauris nunc congue. Malesuada nunc vel risus commodo viverra maecenas. Et egestas quis ipsum suspendisse. {++Ac placerat vestibulum lectus mauris. Diam donec adipiscing++} tristique risus nec feugiat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {++Libero enim sed++} {--faucibus turpis in--} eu mi bibendum neque. Turpis massa sed elementum tempus egestas sed sed. Id semper risus in hendrerit gravida rutrum quisque non. {==Aenean pharetra magna ac placerat vestibulum==} lectus mauris ultrices eros. Cras semper auctor neque vitae tempus quam pellentesque. In nisl nisi scelerisque eu. Commodo nulla facilisi nullam vehicula ipsum. Volutpat consequat mauris nunc congue. Malesuada nunc vel risus {--commodo viverra maecenas. Et--} egestas quis ipsum suspendisse. Ac placerat vestibulum lectus mauris. Diam donec {++adipiscing++} tristique risus nec feugiat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore {==et dolore magna==} aliqua. Libero {==enim sed faucibus==} turpis in eu mi bibendum neque. Turpis massa sed elementum tempus egestas sed sed. Id semper risus in hendrerit gravida rutrum quisque non. Aenean pharetra magna ac {--placerat vestibulum lectus--} mauris ultrices eros. Cras semper auctor neque vitae tempus quam pellentesque. In nisl nisi scelerisque eu. Commodo nulla facilisi nullam vehicula ipsum. Volutpat consequat mauris nunc congue. Malesuada nunc {>>vel risus commodo viverra<<} maecenas. Et egestas quis ipsum suspendisse. Ac placerat vestibulum lectus mauris. Diam donec adipiscing tristique risus nec feugiat.

This is what appeared in the terminal — oh interesting. I was going to copypaste the terminal output and realized I had run it within an anaconda env. So I deactivated the environment, and just reran it … slightly different result, in that which python said not found. (I’ve just obscured info in my *nix prompt or whatever it’s called)

xxxx@xxxx ~ % cat ~/Desktop/critictest.md | /Applications/Marked\ 2.app/Contents/Resources/markedcritic.py
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut <span class="critic criticcomment">commenting: labore et dolore magna aliqua</span>. Libero enim sed faucibus turpis in eu mi bibendum neque. Turpis massa sed elementum tempus egestas sed sed. Id semper risus in hendrerit gravida rutrum quisque non. Aenean pharetra magna ac placerat vestibulum lectus mauris ultrices eros. <del class="crit">Cras semper auctor neque</del> vitae tempus quam pellentesque. In nisl nisi scelerisque eu. Commodo nulla facilisi nullam vehicula ipsum. Volutpat consequat mauris nunc congue. Malesuada nunc vel risus commodo viverra maecenas. Et egestas quis ipsum suspendisse. <span style="display:none"></span><ins class="crit">Ac placerat vestibulum lectus mauris. Diam donec adipiscing</ins> tristique risus nec feugiat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <span style="display:none"></span><ins class="crit">Libero enim sed</ins> <del class="crit">faucibus turpis in</del> eu mi bibendum neque. Turpis massa sed elementum tempus egestas sed sed. Id semper risus in hendrerit gravida rutrum quisque non. <mark class="crit">Aenean pharetra magna ac placerat vestibulum</mark> lectus mauris ultrices eros. Cras semper auctor neque vitae tempus quam pellentesque. In nisl nisi scelerisque eu. Commodo nulla facilisi nullam vehicula ipsum. Volutpat consequat mauris nunc congue. Malesuada nunc vel risus <del class="crit">commodo viverra maecenas. Et</del> egestas quis ipsum suspendisse. Ac placerat vestibulum lectus mauris. Diam donec <span style="display:none"></span><ins class="crit">adipiscing</ins> tristique risus nec feugiat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore <mark class="crit">et dolore magna</mark> aliqua. Libero <mark class="crit">enim sed faucibus</mark> turpis in eu mi bibendum neque. Turpis massa sed elementum tempus egestas sed sed. Id semper risus in hendrerit gravida rutrum quisque non. Aenean pharetra magna ac <del class="crit">placerat vestibulum lectus</del> mauris ultrices eros. Cras semper auctor neque vitae tempus quam pellentesque. In nisl nisi scelerisque eu. Commodo nulla facilisi nullam vehicula ipsum. Volutpat consequat mauris nunc congue. Malesuada nunc <span class="critic criticcomment">vel risus commodo viverra</span> maecenas. Et egestas quis ipsum suspendisse. Ac placerat vestibulum lectus mauris. Diam donec adipiscing tristique risus nec feugiat.%                                                                                  xxxx@xxxx ~ % which python    
python not found
xxxx@xxxx ~ % which python3   
/opt/homebrew/bin/python3
xxxx@xxxx ~ % 

I wonder if Marked is having trouble finding the Python install in the homebrew directory. It assumes python3. But it works for me, and that’s what which python3 returns for me as well… Let me try hardcoding that path and get you a debug build.

Ok, here’s a build to test my theory. https://from.ttscoff.me/Marked2.6.301052.zip

Don’t overwrite your existing copy, just run it from your downloads folder and see if it works with your CriticMarkup or not. No guarantees, just a stab.

Hi…

Jumping in here (sorry…)

I had this problem and reported it back in March (Files containing Critic Markup fail to be displayed in Marked / Problems / Discussion Area - Marked Support.

Happily, I can report that the debug build does solve the problem for me, at least.

I’m on Sonoma 14.1, MacBook Pro M1 Pro, App Store version of Marked. which python reports no python, which python3 reports /opt/homebrew/bin/python3.

Do you need any more information?

Many thanks for this (and so many other useful programs)!

David

1 Like

Apologies for the delay — yes, this fixes things on my end as well, both in the test document and in some random real-world documents that previously had problems. Thank you!

Oh, cool. I’ll get an update out. You’ll want to use the official update when it’s available, as the build I sent you won’t output PDFs.

1 Like

Update is available for Paddle and MAS customers, Setapp pending review.

2 Likes