-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Linking multiple PDFs in one line causes parsing error #3631
Comments
Agree, this is a bug. The following: Download the [3x3x3 speedcubing guide](/content/andy-klise-3x3x3-speedcubing-guide-v4.pdf), [3x3x3 speedcubing guide for lefties](/content/andy-klise-3x3x3-speedcubing-guide-v4-lefty.pdf), and the [OLL guide](/content/andy-klise-3x3x3-oll-v3.pdf). It gets parsed fine by MDX: https://mdxjs.com/playground So this issue is our fault, and probably due to our remark plugin that rewire link to static files as React links + webpack file-loader require calls (this has a few advantages, like adding a hash to the linked files to improve caching) A possible workaround is to opt-out to these require calls by using the Download the [3x3x3 speedcubing guide](pathname:///content/andy-klise-3x3x3-speedcubing-guide-v4.pdf), [3x3x3 speedcubing guide for lefties](pathname:///content/andy-klise-3x3x3-speedcubing-guide-v4-lefty.pdf), and the [OLL guide](pathname:///content/andy-klise-3x3x3-oll-v3.pdf). For anyone willing to fix this bug, this should be related to https://github.com/facebook/docusaurus/tree/master/packages/docusaurus-mdx-loader/src/remark/transformLinks |
Strange, but I can't reproduce this. I cloned the demo repo, run the site and don't see any errors 🤷♂️ |
Sorry, I forgot that I removed the line that triggers the bug from the demo. I added the following sentence back into the Download the [3x3x3 speedcubing guide](/content/andy-klise-3x3x3-speedcubing-guide-v4.pdf), [3x3x3 speedcubing guide for lefties](/content/andy-klise-3x3x3-speedcubing-guide-v4-lefty.pdf), and the [OLL guide](/content/andy-klise-3x3x3-oll-v3.pdf). Please pull for the latest commit. Thanks. |
🐛 Bug Report
Linking multiple PDFs in one line in a
.md
file causes parsing error.Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
static
folder calledcontent
content
, folder, run the following commands to download sample pdfs:.template.md
):will give this error:
Expected behavior
I thought the markdown would parse normally.
Actual Behavior
I get a syntax error.
Your Environment
Reproducible Demo
(Paste the link to an example repo, including a
siteConfig.js
, and exact instructions to reproduce the issue.)https://github.com/TheodoreChu/docusaurus-bug-report-demos/blob/main/docs/pdf-bug.md
Temporary workaround
Link the pdf files on separate lines as in step 3.
The text was updated successfully, but these errors were encountered: