[gatsby-remark-embed-snippet]: lack of snippet options #28776
Unanswered
edukisto
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
This is a feature request.
gatsby-remark-embed-snippet
does not allow to use any ofgatsby-remark-prismjs
snippet options, such asnumberLines
,outputLines
,promptHost
,promptUser
, and a nameless option for highlighting lines.Steps to reproduce
See a reproduction.
Create a source file:
Use
gatsby-remark-embed-snippet
to embed the content of the source file in a Markdown file:Run
gatsby develop
.Add options for
gatsby-remark-prismjs
:However, the original syntax is error-prone. It's better to use a single JSON5 object instead:
embed:example.sh{highlightRange: 5, numberLines: true, outputLines: "2,4", promptHost: "wonderland", promptUser: "alice"}
. ThehighlightRange
option is a replacement for the nameless option for highlighting lines.Gatsby throws an exception.
Expected result
I would like to have the same output as if I wrote the following:
This works great with
gatsby-remark-prismjs
.Actual result
Environment
Beta Was this translation helpful? Give feedback.
All reactions