Skip to content

Hiding lines from code blocks #7113

Answered by kamilkrzyskow
ollipa asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ollipa,
after consulting the SuperFences and Highlight docs I don't see any option to hide lines:

However, after looking at the source code, I see that hl_lines is passed to the Highlight.highlight function together with the src code to be highlighted. So you could create a hook which adds a decorator function to monkey-patch either Highlight.highlight or ‎SuperFencesBlockPreprocessor.highlight to handle your own hide_lines attribute and remove the lines yourself. The hook needs to patch the function before it's invoked, so likely the o…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ollipa
Comment options

@kamilkrzyskow
Comment options

@ollipa
Comment options

Answer selected by ollipa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants