Skip to content

Commit

Permalink
Ignore blocks of code
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed May 16, 2024
1 parent 215f72e commit 01d3f4d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ignore.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//const IG_STARTS: [&str; 1] = ["\\begin{verbatim}"];
//const IG_ENDS: [&str; 1] = ["\\end{verbatim}"];

pub struct Ignore {
skip: bool,
block: bool,
Expand Down
6 changes: 6 additions & 0 deletions tests/ignore_in.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@

Lines which end with the ignore keyword are not indented or wrapped % tex-fmt: skip

% tex-fmt: off
It is also possible to ignore blocks
of lines together and not indent them
even like this
% tex-fmt: on

\end{document}
6 changes: 6 additions & 0 deletions tests/ignore_out.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@

Lines which end with the ignore keyword are not indented or wrapped % tex-fmt: skip

% tex-fmt: off
It is also possible to ignore blocks
of lines together and not indent them
even like this
% tex-fmt: on

\end{document}

0 comments on commit 01d3f4d

Please sign in to comment.