Skip to content

Commit

Permalink
Add {{#shiftinclude}} to L/R shift on include
Browse files Browse the repository at this point in the history
Syntax is the same as {{#include}} except with a shift value and colon
before the remaining arguments, e.g.

  {{#include -2:somefile.rs:myanchor}}

A positive value for the shift prepends spaces to each line.

A negative value for the shift removes chars from the beginning of each
line (including non-whitespace chars, although this will emit an error
log).

Possibly helpful/relevant to:
- rust-lang#1564: #include with indented
- rust-lang#1601: option to remove indentation of included file snippets
  • Loading branch information
daviddrysdale committed Mar 2, 2024
1 parent 5a35144 commit db91165
Show file tree
Hide file tree
Showing 3 changed files with 396 additions and 49 deletions.
Loading

0 comments on commit db91165

Please sign in to comment.