Joplin: Mac App Renders formula source code

Created on 19 Mar 2020  路  9Comments  路  Source: laurent22/joplin

Joplin app renders a portion of formula source code before the correct rendering:

Screen Shot 2020-03-19 at 12 53 18 PM

Environment

Joplin version: Joplin 1.0.194 (prod, darwin)
Platform: Mac OS 10.15.3 (19D76)

bug desktop high renderer

All 9 comments

I can confirm this. It only happens for inline Katex:

image

On file ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js Line 246:

return `<span class="joplin-editable"><pre class="joplin-source" data-joplin-source-open="$" data-joplin-source-close="$">${latex}</pre>${renderToStringWithCache(latex, options)}</span>`;

<pre class="joplin-source" data-joplin-source-open="$" data-joplin-source-close="$">${latex}</pre> renders the source and then ${renderToStringWithCache(latex, options)} renders the formula. Almost looks like it was intentional. Removing the first part fixes the issue. Any idea why it was there?

Maybe it was debugging code that was not removed. Or maybe it has something to do with the new WYSIWYG editor. Laurent would know for sure.

On file ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/katex.js Line 246:

return `<span class="joplin-editable"><pre class="joplin-source" data-joplin-source-open="$" data-joplin-source-close="$">${latex}</pre>${renderToStringWithCache(latex, options)}</span>`;

<pre class="joplin-source" data-joplin-source-open="$" data-joplin-source-close="$">${latex}</pre> renders the source and then ${renderToStringWithCache(latex, options)} renders the formula. Almost looks like it was intentional. Removing the first part fixes the issue. Any idea why it was there?

I can confirm this on Electron client as well.

Confirm this.
Joplin 1.0.195 (prod, darwin)

That should be fixed on master.

@laurent22 can confirm fixed on master. Any chance to get another release cut with this? The bug made it to my iPhone :(

Same issue, but on Manjaro Linux, thanks for fix and waiting for the next release!

Should be fixed from next version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haitaogithub picture haitaogithub  路  46Comments

sczhg picture sczhg  路  47Comments

gerroon picture gerroon  路  70Comments

GuyOlivier picture GuyOlivier  路  37Comments

poVoq picture poVoq  路  69Comments