Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add {{#shiftinclude}} command #2333

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Mar 2, 2024

  1. Add {{#shiftinclude}} to L/R shift on include

    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).
    daviddrysdale committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    6c7b259 View commit details
    Browse the repository at this point in the history
  2. Support {{#shiftinclude auto}}

    As well as allowing explicitly-specified shift amounts, also
    support an "auto" option that strips common leftmost whitespace
    from an inclusion.
    daviddrysdale committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    a886ff5 View commit details
    Browse the repository at this point in the history