Skip to content
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

HTML comments visible as plain text #1326

Closed
FezVrasta opened this issue Apr 5, 2019 · 8 comments · Fixed by #1347
Closed

HTML comments visible as plain text #1326

FezVrasta opened this issue Apr 5, 2019 · 8 comments · Fixed by #1347

Comments

@FezVrasta
Copy link

Current behavior

Markdown files containing HTML comments (<!-- ... -->) are visible as plain text since the upgrade to 9.x (9.0.5).

To reproduce

Sorry I don't have time to create a repro, but it's straight forward to reproduce.

Expected behavior

The HTML comments should be hidden when rendered.

@sapegin
Copy link
Member

sapegin commented Apr 5, 2019

Feel free to send a pull request with a fix.

@eragon512
Copy link
Collaborator

@FezVrasta @sapegin I want to take up this issue, however, I am unable to reproduce this issue with the mentioned version [email protected]. Any idea on how to reproduce it?

@FezVrasta
Copy link
Author

Can you look at https://github.com/quid/refraction please? You can reproduce it in that repository, you just need to comment out the manual workaround I added.

I'm sorry but my home is without electricity until Monday so I can't be more helpful 😞

@eragon512
Copy link
Collaborator

eragon512 commented Apr 27, 2019

@FezVrasta the issue seems to be with the markdown-to-jsx dependency => this dependency failes to recognise multiline (internally spaced with \n) HTML comments.

@sapegin This is a live demo of the dependency, for confirmation: https://probablyup.com/markdown-to-jsx/. You can confirm the issue by trying to enter any multiline HTML comment on the demo input.

These look like alternatives where the above problem doesn't exist:

Are there any better alternatives?
What next steps can we take to close this issue?

@eragon512
Copy link
Collaborator

@sapegin sent a PR with a test to reflect this issue

@eragon512
Copy link
Collaborator

Created a corresponding issue in quantizor/markdown-to-jsx#246 for this, will need follow-up

@eragon512
Copy link
Collaborator

eragon512 commented May 4, 2019

@sapegin um, updated the above test PR with a fix to close out this issue #1347

sapegin pushed a commit that referenced this issue May 16, 2019
## New features

### Support React Hooks in examples

You can now use hooks in the examples, like the `useState` hook:

 ```jsx
const [count, setCount] = React.useState(42);
<Button onClick={() => setCount(count + 1)}>{count}</Button>
```

(#1353 by @eragon512)

## Bug fixes

* Accessibility fixes ([#1359](#1359) by @J-Kallunki)
* `getExampleFilename` should use default example if file does not exist ([#1362](#1362)) by @mendrew, closes [#1338](#1338)
* Hide HTML comments in Markdown files ([#1347](#1347) by @eragon512, closes #1326)
@styleguidist-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants