platers / obsidian-linter

An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
https://platers.github.io/obsidian-linter/
MIT License
1.25k stars 84 forks source link

Bug: Ensuring consistent blockquote style removes list paragraph indentation #1181

Open Karmac opened 2 months ago

Karmac commented 2 months ago

Describe the Bug

When "Makes sure blockquote style is consistent" is checked the plugin removes indentation from lists with multiple paragraphs.

How to Reproduce

Example to reproduce issue with

>- List item 1.
>
> - List item 2.
>
>    Second paragraph.
>
>- List item 3.

Expected Behavior

> - List item 1.
>
> - List item 2.
>
>    Second paragraph.
>
> - List item 3.

Actual behaviour

> - List item 1.
>
> - List item 2.
>
> Second paragraph.
>
> - List item 3.
pjkaufman commented 2 months ago

Hey @Karmac , thanks for reporting this. This is really not going to be an easy fix from my recollection, because I am not really sure how you check if part of a blockquote is a list item. I will have to see what can be done at some point. The AST does agree that that indentation level is a part of the list item, so it is a bug.

pjkaufman commented 1 month ago

It looks like ignoring list items is not feasible for this, so it looks like there need to be two stages to the formatting of blockquotes: