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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "Partial" Import Code Snippet #2118

Closed
jjangga0214 opened this issue Jan 8, 2020 · 2 comments
Closed

Allow "Partial" Import Code Snippet #2118

jjangga0214 opened this issue Jan 8, 2020 · 2 comments

Comments

@jjangga0214
Copy link

Feature request

What problem does this feature solve?

Import Code Snippet feature is cool. Users don't have to copy and paste code from the original file. It does not require "syncing" when the the referred file is modified.

However, in most cases, I'd want to import just a few lines from the source code. Because the entire file would be obviously "long" in many cases, and contains "unnecessary" content.

What does the proposed API look like?

Let's assume I want to only import from line 5 to 10.

Proposal 1
<<< [5-10] @/filepath
Proposal 2
<<< @/filepath [5-10] 
Proposal 3
<<< @/filepath[5-10] 

Are you willing to work on this yourself?

Not sure right now.

@meteorlxy
Copy link
Member

See #1336

For now, you can try this markdown-it plugin: https://github.com/fabbballin/markdown-it-vuepress-code-snippet-enhanced

@billyyyyy3320
Copy link
Collaborator

Resolved by #2225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants