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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown entry point with relative path producing odd links #2835

Closed
bbugh opened this issue Mar 23, 2019 · 1 comment
Closed

Markdown entry point with relative path producing odd links #2835

bbugh opened this issue Mar 23, 2019 · 1 comment
Labels
馃悰 Bug Stale Inactive issues

Comments

@bbugh
Copy link

bbugh commented Mar 23, 2019

馃悰 bug report

Hurray! Markdown as an entry point.

However, I've run into some small but breaking issues.

馃帥 Configuration (.babelrc, package.json, cli command)

{
  "version": "2.0.0",
  "scripts": {
    "serve": "parcel src/index.html --global helpers",
    "build": "parcel build src/index.html --global helpers"
  },
  "devDependencies": {
    "csscomb": "^4.2.0",
    "eslint": "^5.14.0",
    "htmllint": "^0.7.3",
    "marked": "^0.6.1",
    "parcel-bundler": "^1.11.0",
    "sass": "^1.17.0"
  }
}

馃 Expected Behavior

Given the files:

  • /src/index.html
  • /CHANGELOG.md

When I link to the changelog.md file:

<a href="../CHANGELOG.md" target="_blank">CHANGELOG</a>`

Then Parcel should produce:

  • a file named dist/changelog.html
  • code in index.html like <a href="changelog.html" target="_blank">CHANGELOG</a>

馃槸 Current Behavior

My current setup uses src/index.html as an entry point, and I'm linking from there to the git changelog.md:

<a href="../CHANGELOG.md" target="_blank">CHANGELOG</a>

Issue 1: the output is adding extra slash and underscores to the link:

<!-- compiled index.html -->
<a href="/__/CHANGELOG.html" target="_blank">CHANGELOG</a>

Issue 2: it's linking to an all-caps CHANGELOG.html, but the file it is producing is lowercase changelog.html.

Issue 3: it's producing two nearly identical html files. They appear to be the same, except the one under __/ looks like it's been uglified.

dist/changelog.html
dist/__/changelog.html

This doesn't happen with images, if I experimentally replace ../CHANGELOG.md with ../some-image.png

馃拋 Possible Solution

I'm guessing that some step with normalizing filenames in the markdown entry point code should be happening, but isn't.

馃敠 Context

Described above.

On case-sensitive servers, this is a breaking issue.

馃捇 Code Sample

Described above.

馃實 Your Environment

Software Version(s)
Parcel 1.12.3
Node v10.15.3
npm/Yarn yarn 1.13.0
Operating System MacOS 10.12.6
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Jan 17, 2020
@github-actions github-actions bot closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Bug Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

2 participants