-
Notifications
You must be signed in to change notification settings - Fork 13
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
Extra HTML to Markdown Work to fix bugs #26
Conversation
Sorta fixing tables. Definitely fixed emojis
A mostly working fix on code tags in Markdown Conversion
Also, not sure what happened with the commits for this PR, but the only new ones are the last four. The changed files look to be correct though and show only the changes from the last four commits. |
Thanks for working on this! I'll take a look, but probably not until next week. |
I'm continuing to work on this, looking to integrate it into the main branch. Thoughts/comments:
Another approach: abandon this and use Pandoc instead. Pro: well-maintained and active project. Cons: requires users to install Pandoc; requires work to interface with the Pandoc server. |
For the issue of escaping the '<>' symbols for the HTML to render correctly, we have come up with two separate possible solutions.
The first solution is on the client side, in the CodeChatEditor.mts file. A new rule was added to the turndown service to attempt to escape only the necessary symbols. This solution leaves the escaped versions of the symbols in the source code & also escapes the '<>' symbols within code sections. The escaped HTML does not render correctly within code sections, so this solution is not fully working as of now.
The second finished solution is on the server side, in the webserver.rs file. A regex was used to escape some of the '<>' symbols during the markdown-to-HTML process. All of the '<>' symbols not within code sections (between backticks for markdown) are escaped so they are not read as HTML tags. The '<>' symbols within code sections are not escaped due to them not rendering correctly if escaped.
Other minor fixes from the previous PR: