cqroot / joplin-outline

A markdown outline (TOC) sidebar plugin for Joplin.
MIT License
215 stars 16 forks source link

Headers not shown after Code Highlighting in Text #78

Closed janklostermann closed 1 year ago

janklostermann commented 1 year ago

First of all: Thanks for this really helpful plugin!!! I observed an interesting bug:

The following markdown is properly parsed in the editing as in the preview area:

# Joplin Plugin Outline Bug 
## header 1
` ``` `

## header 2
Blocks of code are either fenced by lines with three back-ticks ` ``` `, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.

## header 3

But the outline misses header 2 as you can see below. That header 3 appears is only due to the "fixing" that the syntax highlighting in section 2 apparently does. (If you take out the content (the syntax highlighting) from section 1 then header 2 appears but header 3 disappears from the outline, as there is no fixing of the highlighting in section 2.)

Copy-Paste from the outline frame:

OUTLINE
 Joplin Plugin Outline Bug
  header 1
  header 3

The expected behaviour would be consistent (and correct) parsing also by the outline plugin. I would be very thankful if you could fix this.

I am using Joplin with outline plugin v1.5.7. Joplin 2.9.17 (prod, win32)

Client ID: dd9058239a4a4c35b0a0c199d3bb6641 Sync Version: 3 Profile Version: 41 Keychain Supported: No

Revision: a84a8e7

cqroot commented 1 year ago

1.5.8 fixed it.