Open oleole39 opened 1 year ago
It should be fixed now. Thanks for your feedback ! :)
Thank you, I feel this is a kind of perfect fix!
Now a discrepancy remains between the behavior of Jopin Enhancement in the edit panel, and what is actually rendered in the preview panel, as mentioned in the first point of the edit section of my first message and shown in below sample (everything works as expected until the fourth point):
1. first point (list item alone)
2. second point (list item alone with block content)
$$ \text{Test ratio} = \frac{\text{Test A}} {\text{Test B}} $$
3. third point (sublist items with various block content cases)
1. first subpoint (katex case)
$$ \text{Test ratio} = \frac{\text{Test A}} {\text{Test B}} $$
2. second subpoint (code blocks case)
```txt
second subpoint code blocks
3. third subpoint (picture case)
![third subpoint picture](:/fad71f9cdf9547f1ba3437eab43d902c)
4. fourth and final subpoint
I can think only of a few straightforward alternatives for the list numbering autocorrection feature:
The second main alternative is what implements this fix which I perceive as the correct way to deal with all this. As I couldn't find a related issue on Joplin core's github tracker & forum I created a post in the forum linking to the current issue. I don't close the issue yet due to that.
There could be one more improvement to this fix - that a subpoint without a bullet is actually not counted in the numbering. It would seem somehow more logical to me, although related to a use case I don't find very logicial - so I don't need really this improvement to be done.
Hello,
Following issue report #35 (current issue reported using the modified plugin version you shipped in issue #35 if it matters) , here is another behavior likely to be unwanted as it is inconsistent with the preview panel.
In the edit panel, having a picture as a subpoint of a list ends the current list numbering (the list is autocorrected as below by the Automatically correct list numbering when editing" option)
I guess the same issue happens whatever block item is used inside a list (i tested only image, code block, katex element, and plain text).
An idea of a pattern mimicking the preview panel's behavior (I didn't check its code, that could be another interesting starting point) could be checking the content of the line preceding the current one and determine if is:
Edit: the preview panel actually interpret differently indentation depending on the content type: