azu / gitbook-plugin-include-codeblock

GitBook plugin for including file
Other
40 stars 25 forks source link

Make unindent work with sliced code #54

Closed tschaub closed 6 years ago

tschaub commented 6 years ago

The unindent option doesn't currently work with sliced code because the slicer trims code before unindenting happens. So the first line of code always has 0 spaces and no unindenting happens.

I've added a test case that fails without changes to the source. With these changes, sliced code can be properly unindented.

azu commented 6 years ago

@tschaub Thanks!

Release https://github.com/azu/gitbook-plugin-include-codeblock/releases/tag/3.1.2