You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that this is a issue rather than a question.
Bug report
In a Markdown file's internal link, if the link's filename ends with "index.md", e.g. "creating-index.md", in the generated HTML, that link links to a file named "creating-".
Version
0.14.4
Steps to reproduce
Embed an internal link inside a Markdown file under directory docs/guide/. The link is [instruction-index.md](creating-index.md), like so:
Build the website locally using npm run docs:build. Then in the generated website, hover above that link, you'll see the URL of this link is actually to a page named "creating-", like so
What is expected?
The link should point to xxx/guide/creating-index.html
What is actually happening?
The link points to xxx/guide/creating-
Other relevant information
I tried other filenames.
If the file is named creatingindex.md (without the hyphen in between), then the link is xxx/guide/creating.
If the file is named instruction-index.md, then the link is xxx/guide/instruction-.
if the file is named 01234567index.md, then the link is xxx/guide/01234567.
if the file is named 01234567-readme.md, then the link is xxx/guide/01234567- (the "readme" substring is cut, too)
suspect
I have a suspect, though: vuepress/packages/@vuepress/markdown/lib/link.js, variable indexRE.
Your OS: macOS 10.14
Node.js version: 11.0.0
Browser version: Chrome 70.0.3538.77
Is this a global or local install? Global
Which package manager did you use for the install? npm
The text was updated successfully, but these errors were encountered:
Leedehai
changed the title
substring "index" is dropped from filename
In a link, substring "index" and beyond is dropped from filename
Nov 11, 2018
Bug report
In a Markdown file's internal link, if the link's filename ends with "index.md", e.g. "creating-index.md", in the generated HTML, that link links to a file named "creating-".
Version
0.14.4
Steps to reproduce
Embed an internal link inside a Markdown file under directory
docs/guide/
. The link is[instruction-index.md](creating-index.md)
, like so:Build the website locally using
npm run docs:build
. Then in the generated website, hover above that link, you'll see the URL of this link is actually to a page named "creating-", like soWhat is expected?
The link should point to
xxx/guide/creating-index.html
What is actually happening?
The link points to
xxx/guide/creating-
Other relevant information
I tried other filenames.
If the file is named
creatingindex.md
(without the hyphen in between), then the link isxxx/guide/creating
.If the file is named
instruction-index.md
, then the link isxxx/guide/instruction-
.if the file is named
01234567index.md
, then the link isxxx/guide/01234567
.if the file is named
01234567-readme.md
, then the link isxxx/guide/01234567-
(the "readme" substring is cut, too)suspect
I have a suspect, though:
vuepress/packages/@vuepress/markdown/lib/link.js
, variableindexRE
.The text was updated successfully, but these errors were encountered: