Add configuration option to disable the default hidelines feature for rust
Simple change that adds a configuration option to disable the default hidelines feature for rust:
Usage:
[output.html.code]
default-hidelines = false
I need this in my book since I have several multi-line strings that have lines starting with #. (Embedded code snippets with preprocessor directives.)
~~Let me know if this needs a test.~~
If you want I can also add a line to the manual, but since this is a niche feature, the doc string might just be enough. :)
[Edit: Added a test]
I need this in my book since I have several multi-line strings that have lines starting with
#. (Embedded code snippets with preprocessor directives.)
You can use two consecutive hashes ## to keep the line visible.
Hi @max-heller, thanks for the hint!
Unfortunately this will not work in my case, as I'm trying to include the code from a source file via {{#include filename}}, and the source file will only work with this particular line starting with a single '#'.
(One could argue whether the line hiding mechanism should be disabled completely for included sources via {{#include filename}}. But I did not want to open that can of worms. :grimacing:)
:umbrella: The latest upstream changes (possibly 21f2435182e4a80c0bd0e3184ce36f7a57529d08) made this pull request unmergeable. Please resolve the merge conflicts.
Updated to
- resolve merge conflicts
- conform to updated formatting guidelines
- fix creation of now-
non_exhaustivestructs
:umbrella: The latest upstream changes (possibly 1c034bdd9a8ecc2212a7613efd60995dc90dd0a8) made this pull request unmergeable. Please resolve the merge conflicts.
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.
Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.
Rebased onto the new HTML rendering pipeline (#2844).