Replies: 3 comments 1 reply
-
No updates or mentions of this feature? 😢 |
Beta Was this translation helpful? Give feedback.
-
As a workaround, you can utilise Github flavoured Markdown diff attribute. So, instead of specifying a language after your 3 backticks, you could specify diff. Example: + Chelsea are going to be Premier League Champions 2023/2024
- Arsenal are going to be Premier League Champions 2023/2024 |
Beta Was this translation helpful? Give feedback.
-
Highlighting lines is fine, but it could also be interesting to add some way to highlight arbitrary chunks of text, for example by using a single backtick character. This might make things slightly incompatible with vanilla Markdown, since there's supposed to be nothing inside a code block that can be parsed as markup - but I suppose that can be mitigated by using a directive at the beginning, and it would not break existing parsers, it would just cause these backtick characters to be displayed. This is what I mean:
Does this make sense? |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Product Feedback
Body
where:
what i like:
I have a fenced code blocks. I like to mark some lines as highlighted.
To highlight lines, you can use one of the following directives as comments in your code:
highlight-line
highlights the current line;highlight-next-line
highlights the next line;highlight-start
highlights the lines until the matching hightlight-end;highlight-range{1, 4-6}
will highlight the next line, and the fourth, fifth and sixth lines.since detecting comments of a specific language and removing code i would not prefer i suggest a marker at the start of the codeblock would be also enough for this line highlighting:
or better as a named property
named properties are better so that this is open for other properties like
title=
existing implementations and examples
see: https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-prismjs#line-highlighting
Note:
with highlight I don't mean syntax highlighting for a specific language. this is still available as:
Beta Was this translation helpful? Give feedback.
All reactions