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
Import code snippet in Vue template, which means it works in Markdown page, Vue page or even HTML page and Pug page, it just works everywhere
Simply use the Vue component:
<import-snippet path="./sample-code.js" highlightLines="[1,3]" />
Use a custom vue-template-compiler module to transform:
to:
<import-snippet :content="require('!import-snippet-loader?{highlightLines:[1,3]}!./sample-code.js')" />
import-snippet-loader is webpack loader which uses saber-markdown to transform the code into <pre><code></code></pre> and returns it.
import-snippet-loader
<pre><code></code></pre>
Yes
There is a $60.00 open bounty on this issue. Add more on Issuehunt. Checkout the Issuehunt explorer to discover more funded issues. Need some help from other developers? Add your repositories on Issuehunt to raise funds.
There is a $60.00 open bounty on this issue. Add more on Issuehunt.
The text was updated successfully, but these errors were encountered:
@IssueHunt has funded $60.00 to this issue.
Sorry, something went wrong.
No branches or pull requests
Feature request
What problem does this feature solve?
Import code snippet in Vue template, which means it works in Markdown page, Vue page or even HTML page and Pug page, it just works everywhere
What does the proposed API look like?
Simply use the Vue component:
How should this be implemented in your opinion?
Use a custom vue-template-compiler module to transform:
to:
import-snippet-loader
is webpack loader which uses saber-markdown to transform the code into<pre><code></code></pre>
and returns it.Are you willing to work on this yourself?
Yes
The text was updated successfully, but these errors were encountered: