-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Language-specific Code Tabs (Code blocks) broke referenced links #1215
Comments
I'm also getting the same issue. Only way I've found to workaround (other than manually link all references) is to include the link reference before and after the code block. Example:
|
Same here. I have multiple Tried on 1.6.2 and 1.7.2. |
Thank you all for the reports. @fiennyangeln Do you have time to look into this? |
I will take a look at it tonight 😄 |
- The reason is that the previous Codeblock implementation separates the tabs, the markdown before tabs, and the markdown after tabs into separate Remarkable component, thus they don't share information regarding the reference link - To solve this, change the Doc implementation so that one Doc have only one Remarkable component by transforming the codeblock into html string and add it as part of the markdown, letting the Remarkable take care of the html string - However, this approach made us need to ensure that there is no newline in the codetab, otherwise, the formatting inside the code will be broken. Thus, I replace every newline inside the code tag with a br tag Fix facebook#1215
@cuddergambino I think as long as the link is above the code tab it is ok, so the link below the code tab can be removed, as @blemelin mentioned. |
* Fix bug Code block tabs broke the referenced links - The reason is that the previous Codeblock implementation separates the tabs, the markdown before tabs, and the markdown after tabs into separate Remarkable component, thus they don't share information regarding the reference link - To solve this, change the Doc implementation so that one Doc have only one Remarkable component by transforming the codeblock into html string and add it as part of the markdown, letting the Remarkable take care of the html string - However, this approach made us need to ensure that there is no newline in the codetab, otherwise, the formatting inside the code will be broken. Thus, I replace every newline inside the code tag with a br tag Fix #1215 * Fix prettier
🐛 Bug Report
Hi,
I'm using some referenced links and I've had a problem, to use the new feature Coding blocks.
Referenced markdown links:
![markdown-links-issue](https://user-images.githubusercontent.com/13769562/52080698-92792d00-257f-11e9-9f3c-b65428fa8501.png)
I've tried to use the Language-specific Code Tabs
After that, my links have been broken.
To Reproduce
https://raw.githubusercontent.com/bruno-alencar/issue-docusaurus/master/test.md
and the link
[Link][test-link]
will work.Expected behavior
If you put directly the link without reference.
Actual Behavior
If you put link code after the comment block, the links broke.
Reproducible Demo
https://github.com/bruno-alencar/issue-docusaurus/blob/master/test.md
The text was updated successfully, but these errors were encountered: