clerk

hlship 2025-07-24T16:48:52.977359Z

Since upgrading to latest clerk, some of the pages in my project no longer load, with an exception:

Clerk evaluated '/Users/howard.lewisship/workspaces/nubank/nubank-work-activity/notebooks/nu-dev.md' in 76.420708ms.
Execution error (ExceptionInfo) at nextjournal.clerk.viewer/viewer-for (viewer.cljc:1458).
cannot find viewer named :nextjournal.markdown/html-inline
This is extra odd, it is an .md file, just contains some basic free-form notes in markdown. This is in version 0.18.1150.

👀 1
mkvlr 2025-07-24T17:47:25.064319Z

can you try if the error persists after calling (nextjournal.clerk/clear-cache!)

mkvlr 2025-07-24T17:47:43.705579Z

do you have an explicit dep on nextjournal/markdown in your project?

hlship 2025-07-24T17:48:30.549339Z

No, don't have such a dep. clear-cache! doesn't help, nor does restarting my REPL.

hlship 2025-07-24T17:50:09.337269Z

Nothing in the stack trace is helping me track down where in my document Clerk is having a problem. I'd share the doc but it has a lot of Nubank internal stuff I can't share.

mkvlr 2025-07-24T17:50:17.502989Z

ok, I can repro it now

hlship 2025-07-24T17:50:29.390099Z

Awesome! What triggers it?

mkvlr 2025-07-24T17:50:44.726009Z

inline html 🙂

mkvlr 2025-07-24T17:50:48.709819Z

hello

<strong>world</strong>

hlship 2025-07-24T17:51:05.474869Z

Ok, I don't have that in the document though? Just ordinary markdown.

mkvlr 2025-07-24T17:51:57.937139Z

strange, need to investigate more then

hlship 2025-07-24T17:51:59.112389Z

Found it:

nu service channel <project>
Was only indented two spaces, not four.

mkvlr 2025-07-24T17:52:51.608929Z

it looks like we added inline html support to nextjournal/markdown and didn’t add the corresponding viewers to clerk

mkvlr 2025-07-24T17:53:03.841089Z

will fix it and cut a bugfix release

mkvlr 2025-07-24T17:53:20.057409Z

thanks for the report!

hlship 2025-07-24T17:53:39.677719Z

Cool. I see this as one part user error, one part error reporting failure (tell me the line where things failed, please!)

mkvlr 2025-07-24T17:55:53.267559Z

true, that would be helpful context for sure

mkvlr 2025-07-24T17:56:28.460859Z

created https://github.com/nextjournal/clerk/issues/762 to track this

mkvlr 2025-07-24T17:57:29.043499Z

not sure how easy we can surface the error location in the markdown

mkvlr 2025-07-24T17:58:04.237539Z

it’s somewhat unexpected that parsing a normal markdown doc results in a viewer error from clerk

borkdude 2025-08-06T13:01:59.826219Z

Should be fixed on the main branch now. We're just passing through <project> as plain text

borkdude 2025-07-28T16:07:05.458789Z

@hlship you weren't actually intending to use inline HTML right?

hlship 2025-07-28T16:20:25.231529Z

No, that was not my intention. Indented with four spaces, it was treated as a literal plain text block containing some brackets, as I intended. But with two spaces, it was still markdown that tried to interpret <project> as (invalid) HTML.