-
Notifications
You must be signed in to change notification settings - Fork 124
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
Code snippets: text in angle brackets become lowercase #101
Comments
It is also causing problems for operators such as Seems to cause problems even in normal text
|
The example in the description can be found here:
|
Sometimes it can even break the whole page. It seems angle brackets inside code snippets are being interpreted as instructions to the parser rather than being ignored as plain text. Another example where the problem occurs if I use
|
It seems like this is a problem with the htmlparser2 library that Markbind is using. This is in fb55/htmlparser2#220 and it does not seem that it will be fixed. Should we consider changing to another HTML parser library like Parse5 or should we fork htmlparser2 and try to fix it ourselves? |
I think htmlparser2 is not actively maintained and buggy as well... |
Nice work @nicholaschuayunzhi . |
@damithc , I think you should credit @danielbrzn, he did the work. |
Creating a fork for this fix sounds reasonable, since the repo is dead. This is a case where a test in #121 would be necessary, for when we change the parser in the future. |
Yup, sorry. |
@damithc @acjh I feel that the fix that I have is quite specific to our project and I'm not sure if it would be appropriate to submit it as a PR to the upstream version. |
@danielbrzn Noted. But isn't it specific to Markdown-in-HTML, rather than MarkBind?
@Gisonrg Shall I set up a repo for this? |
@acjh Ah yes, that's true. I guess we could consider making a PR to the upstream repo. About publishing our fork on npm, how about we have it as a private module? We can still have the fork, but I don't think it's necessary to publish it on npm. |
Ah yes, a private module. |
@danielbrzn I had to do this ugly workaround because of this issue. See if your fix works for this code too. Specifically, https://github.com/nus-te3201/website/blob/master/programming/booleans/text.md |
Seems like it works! |
Nice. |
Forked to MarkBind/htmlparser2 |
For example
<Person>
becomes<person>
after rendering to html.The current workaround is to add extra spaces
< Person >
which stays as< Person >
after rendering.The text was updated successfully, but these errors were encountered: