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

Use backslash to escape multiple markdown sign will display incorrect. #1709

Open
smaragdinesapphire opened this issue Nov 4, 2020 · 3 comments

Comments

@smaragdinesapphire
Copy link

Current behavior

At JSCode at jsx file or md file, it will display incorrect if use multiple backslash to escape multiple underscore at a variable.

To reproduce

At Jsx file:

/**  
 * a\_b\_c\_d  
 */  
const MyComponent = () => {};
export MyComponent;

At md file

a\_b\_c\_d

Both result at react-styleguidist:

<p class="rsg--para-40">a<em class="rsg--text-52 rsg--inheritSize-53 rsg--baseColor-57 rsg--em-59">b</em>c_d</p>

Expected behavior

<p class="rsg--para-40">a_b_c_d</p>
@sapegin
Copy link
Member

sapegin commented Nov 4, 2020

Feel free to send a pull request with a fix 🐛

@smaragdinesapphire
Copy link
Author

Here's the sample.

@mitsuruog
Copy link
Contributor

react-styleguidist have processed the markdown file twice, so finally the escapes have been removed.
I don't have any good ideas how I fix that.

a simple workaround is to escape twice in your markdown file for now.
but I don't recommend it because it can break again in the future tho.

a\\_b\\_c\\_d

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

No branches or pull requests

3 participants