This repository was archived by the owner on Nov 24, 2022. It is now read-only.
Trim base indentation off code block content#74
Merged
Conversation
vedxyz
marked this pull request as draft
June 7, 2022 21:48
vedxyz
force-pushed
the
codeblock-indent-trim
branch
from
June 7, 2022 21:51
f0c8f89 to
4bb94ff
Compare
vedxyz
marked this pull request as ready for review
June 7, 2022 21:56
vedxyz
force-pushed
the
codeblock-indent-trim
branch
from
June 8, 2022 10:37
4bb94ff to
dd61a3d
Compare
vedxyz
force-pushed
the
codeblock-indent-trim
branch
from
September 12, 2022 23:43
dd61a3d to
57ee921
Compare
InfinityGhost
suggested changes
Sep 12, 2022
vedxyz
force-pushed
the
codeblock-indent-trim
branch
from
September 13, 2022 00:00
57ee921 to
2c88bd0
Compare
InfinityGhost
approved these changes
Sep 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Changes
FormattingextensionHave not tested live.
As opposed to my other PR (OpenTabletDriver/OpenTabletDriver.Web#92) which only considered the first line's indentation, this implementation takes the minimum indentation length among all non-blank lines as its baseline.
I think both implementations are okay within their own contexts. With Markdown/HTML it doesn't make much sense to have invalid indentation anyway, but with TabletBot it's a lot more likely to occur as it works with user provided line ranges.