QOwnNotes icon indicating copy to clipboard operation
QOwnNotes copied to clipboard

Highlighting in the editor cannot handle complex cases and has missing features

Open Waqar144 opened this issue 5 years ago • 6 comments

  • [x] Support for overlapping formats such as, bold+italic, code + italic, etc.
  • [x] Em and strong highlighting falls apart quickly in complex cases
  • [x] Inline code spans can not handle complex cases. E.g: ``inline ` code``
  • [x] No strike through support
  • [x] Commonmark compliant indented code blocks
  • [x] Commonmark compliant thematic breaks (Horizontal Rule)
  • [x] Commonmark compliant ATX Headings (Headings starting with # )
  • [x] Commonmark compliant lists
  • [ ] No multiline headings support (Setext Headings)
  • [ ] Link highlighting can have problems such as [link](link.com)., the last dot is getting highlighted

Example:

*italic* *italic*
*`code`*

might not get highlighted correctly

Waqar144 avatar Jan 21 '20 08:01 Waqar144

Most excellent!

pbek avatar Jan 21 '20 16:01 pbek

@Waqar144, in 20.1.14 this code block is broken, it worked in 20.1.13:

```css
a {color: green;}
~~~
adas
~~~
```

image

pbek avatar Jan 22 '20 15:01 pbek

These ones are ok:

~~~
sdfs <strong>strong</strong>
~~~

~~~
```
inner
```

sdfs <strong>strong</strong>
~~~


~~~css
a {color: green;}
~~~

```css
a {color: green;}
```

pbek avatar Jan 22 '20 16:01 pbek

Try now

Waqar144 avatar Jan 23 '20 06:01 Waqar144

Works great, thank you!

pbek avatar Jan 23 '20 07:01 pbek

Indented xml code block is not compliant with Commonmark. test data:

1. foo
    ```bash
    hello='hello world'
    echo $hello
    ```
2. tar
    ```xml
    <hello>
        hello world
    </hello>
    ```

incompliant preview result:

qownnotes version: QOwnNotes - version 23.10.1 - Launchpad PPA - build 1060

9n avatar Oct 16 '23 09:10 9n