Docusaurus: Language-specific Code Tabs (Code blocks) broke referenced links

Created on 31 Jan 2019  路  5Comments  路  Source: facebook/docusaurus

馃悰 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

I've tried to use the Language-specific Code Tabs

markdown-code-issue

After that, my links have been broken.

markdown-broken

To Reproduce

  1. Add the example page on docusaurus docs

https://raw.githubusercontent.com/bruno-alencar/issue-docusaurus/master/test.md

  1. Remove comments (DOCUSAURUS_CODE_TABS, JavaScript, END_DOCUSAURUS_CODE_TABS)

and the link [Link][test-link] will work.

Expected behavior

If you put directly the link without reference.

expected

Actual Behavior

If you put link code after the comment block, the links broke.

error

Reproducible Demo

https://github.com/bruno-alencar/issue-docusaurus/blob/master/test.md

starter

Most helpful comment

I will take a look at it tonight 馃槃

All 5 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:

[test-link]: https://github.com "Github page"

<!--DOCUSAURUS_CODE_TABS-->
<!--JavaScript-->
<!--END_DOCUSAURUS_CODE_TABS-->

[test-link]: https://github.com "Github page"

Same here. I have multiple DOCUSAURUS_CODE_TABS sections on the same doc. When I remove the last one, everything is fine.

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 馃槃

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipmjohnson picture philipmjohnson  路  3Comments

rickyvetter picture rickyvetter  路  3Comments

endiliey picture endiliey  路  3Comments

NikitaIT picture NikitaIT  路  3Comments

awibox picture awibox  路  3Comments