Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows included code to be shifted left or right by a specified amount, or to be automatically left-shifted so that common leading whitespace is stripped.
Uses a new command name
#shiftinclude
to avoid changing the behaviour of any existing books.There are few open issues1 that this might help with :
{{#shiftinclude auto:file.rs}}
here.{{#include ...}}
with indented #1564{{#shiftinclude +4:myfn.rs}}
here.{{#shiftinclude auto:file.rs}}
here.{{#shiftinclude +4:../exercises/chapter6/test/no-peeking/Solutions.purs:eqNonEmpty}}
(but would need to be left-aligned).There are also a few open PRs that this might overtake/replace/combine-with:
{{#include}}
is indented #1565auto
variant here (and is also careful not to affect existing behaviour).Footnotes
I confess that I implemented this without looking at the current open issues/pull requests. ↩