abrookins / WrapToColumn

An IntelliJ plugin that wraps text
Apache License 2.0
62 stars 12 forks source link

Markdown blockquote syntax is incorrectly wrapped #55

Closed nikclayton closed 2 months ago

nikclayton commented 1 year ago

Wrapping long blockquote does not insert new > pair

Suppose you have this text as a single line

> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation 

and wrap it. You get:

> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation

The desired result is that each new line should be preceded by the > pair, to preserve the blockquote, like so:

> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
> quis nostrud exercitation

Re-wrapping paragraph does not preserve blockquote > pair at start of line

Suppose you have this text as multiple lines

> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation

and wrap it. You get:

> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore > magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation

The start-of-line > pair is now in the middle of the line, and as before, new pairs are not inserted.