-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown Export Strikethrough #1666
Comments
This is a bug in turndown library - see mixmark-io/turndown-plugin-gfm#12 Unfortunately it looks like it's not maintained anymore :( |
It looks like it may be possible to remove the plugin's strike-through rule and replace it with a new one (rules.js#L36). Would you accept a pull request that does this? |
I think it would be much better to handle this upstream in the library itself. There's e.g. https://github.com/laurent22/joplin-turndown-plugin-gfm for which seems to be maintained and might accept such PR. |
Hijacking this issue to say that I'm also not happy with the markdown export, specifically the way math is exported using backslashes and parentheses ( What would it take to change the exported markdown format to use the dollar-sign format ( |
That's a complicated issue since ckeditor5-math saves the math expressions into HTML as e.g. Markdown converter doesn't know that this is a math syntax and converts it generically ... |
I see. At which point in the conversion process would this need to be intercepted? The stuff that I encountered is actually simple to reverse - convert |
Ideally there's no interception and it's fixed at the source. You might try to open an issue in https://github.com/isaul32/ckeditor5-math to discuss why does this plugin uses this format ... |
It's relatively clear to me why they use this format - the TeX renderer they use (I guess KaTeX?) allows the use of both the dollar-sign delimiter and the How does export to markdown work? Is there an HTML->MD converter which gets called? I think that's the place where it needs to be fixed, because the HTML is correct as it is, no reason or even no way to fix it. |
Yes, But somehow I'm not sure if that's a good place to fix it. This structure (span, class) is specific to ckeditor5-markdown. Maybe it would be the easiest to just hack it using a simple regex in https://github.com/zadam/trilium/blob/master/src/services/export/md.js |
That might be possible. One would replace |
Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: TriliumNext/Notes#117 |
Trilium 0.45.8
When exporting a note to Markdown,
strikethroughtext is exported with only one tilde on each side, when there should be two.Expected behavior: ~~strikethrough~~
Actual behavior: ~not strikethrough~
The text was updated successfully, but these errors were encountered: