Provide a `| highlight` filter as well?
See original GitHub issueThe paired shortcode is great when I know that an entire block rendered in my template will be code - but sometimes I’m rendering arbitrary markdown that might have code blocks nested inside. In that case, I’d love to do something like:
{{ data | markdown | highlight | safe }}
For now, I’ll try importing prism as a stand-alone in addition to eleventy-plugin-syntaxhighlight
- and use it to generate a custom filter (or tag along on my markdown filter).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Create Advanced Highlight Actions - Tableau Help
This option works well for highlight and filter actions within a dashboard. Select - Click a mark in the view to run the...
Read more >How Can I Apply Both A Filter and Highlight in a View
Yes, you are correct that you can only apply one filter at a time. And you are correct that you would need to...
Read more >Using a brightness() filter to generically highlight content
DigitalOcean provides cloud products for every stage of your journey. Get started with $200 in free credit! Rick Strahl: I can't tell you...
Read more >Introducing a New Highlighting User Experience in Tableau
An Innovative Way to Highlight a Dimension Member within a Tableau ... However, instead of providing links to all seventeen sub-categories, I will...
Read more >Highlighters highlight filter parts · Issue #16705 - GitHub
Highlighters highlight filter parts #16705 ... query part in 1.7 and previous versions, while now filters get highlighted as well with 2.0+.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zachleat I don’t think that quite solves the initial issue here - which is that only some of the
content
might involve fenced code, and only that code should be highlighted. If I understand this right, it would turn the entirecontent
into a code-block instead.I’d love this, too. I’m using a CMS as source for my blogposts and it delivers pre-rendered HTML where code is embedded.
I hope I haven’t overlooked anything, but I’d like to do something like
{{ article.content | highlight | safe }}
.