We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
.vuepress/public/snippet.js
const name = 'First Last' // Create person object let person = { name: name, email: '[email protected]' }
<<< @/.vuepress/public/snippet.js{2-4,6}
npm run dev
vuepress dev
Code should be imported with highlighted lines.
Code import fails with message:
Invalid code snippet option
Examples:
<<< @/.vuepress/public/snippet.js
<<< @/.vuepress/public/snippet.js{2}
<<< @/.vuepress/public/snippet.js{2,4}
<<< @/.vuepress/public/snippet.js{2-4}
<<< @/.vuepress/public/snippet.js{2,4,6}
npx vuepress info
Environment Info: System: OS: Windows 10 10.0.16299 CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz Binaries: Node: 10.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 41.16299.1480.0 npmPackages: @vuepress/core: 1.5.2 @vuepress/theme-default: 1.5.2 vuepress: ^1.5.2 => 1.5.2 npmGlobalPackages: vuepress: Not Found
The text was updated successfully, but these errors were encountered:
Fixed with #2441
Sorry, something went wrong.
No branches or pull requests
Bug report
Steps to reproduce
.vuepress/public/snippet.js
with any content. Here's an example:<<< @/.vuepress/public/snippet.js{2-4,6}
npm run dev
(or whatever your serve command is to runvuepress dev
)What is expected?
Code should be imported with highlighted lines.
What is actually happening?
Code import fails with message:
Examples:
<<< @/.vuepress/public/snippet.js
- ✔️ Works (no highlighted lines)<<< @/.vuepress/public/snippet.js{2}
- ✔️ Works (1 highlighted line)<<< @/.vuepress/public/snippet.js{2,4}
- ✔️ Works (2 highlighted lines)<<< @/.vuepress/public/snippet.js{2-4}
- ✔️ Works (1 range of highlighted lines)<<< @/.vuepress/public/snippet.js{2,4,6}
- ❌ Fails (3 highlighted lines)<<< @/.vuepress/public/snippet.js{2-4,6}
- ❌ Fails (1 range of highlighted lines and 1 single line)Other relevant information
npx vuepress info
in my VuePress project:The text was updated successfully, but these errors were encountered: