Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Conversation

vedxyz
Copy link
Contributor

@vedxyz vedxyz commented Jun 7, 2022

Changes

  • Trim code block indentation within Formatting extension

Have 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.

@vedxyz vedxyz marked this pull request as draft June 7, 2022 21:48
@vedxyz vedxyz force-pushed the codeblock-indent-trim branch from f0c8f89 to 4bb94ff Compare June 7, 2022 21:51
@vedxyz vedxyz marked this pull request as ready for review June 7, 2022 21:56
@vedxyz vedxyz force-pushed the codeblock-indent-trim branch from 4bb94ff to dd61a3d Compare June 8, 2022 10:37
@vedxyz vedxyz force-pushed the codeblock-indent-trim branch from dd61a3d to 57ee921 Compare September 12, 2022 23:43
@vedxyz vedxyz force-pushed the codeblock-indent-trim branch from 57ee921 to 2c88bd0 Compare September 13, 2022 00:00
@InfinityGhost InfinityGhost merged commit 98976ed into InfinityGhost:master Sep 13, 2022
@vedxyz vedxyz deleted the codeblock-indent-trim branch September 13, 2022 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants