Closed solarchemist closed 4 years ago
Confirmed. Thank you for reporting. @Waqar144, another code block regression. :grin:
It even breaks all following code blocks. :grin:
The fix has sort of ripple effect. Fix it in one place, 2 others pop up.
Thanks for reporting. I am rethinking my decision to switch on codeBlock highlighting for ALL codeBlocks. Maybe we should just stick to highlighting only the ones with 'supported languages'
`` ``` ``
xxx
`` ``` ``
The above is not a valid Code Block. So it will still be rendered incorrectly. Use 3 backticks only(life is hard already :laughing: ) (Also we don't support tilde based code block ~~~) (yet) ;)
Use:
```php
//much better highlighting
\``` (backslash here just for demonstrating)
There now is a new release, could you please test it and report if it works for you?
I upgraded to 20.1.6. I can confirm this issue has been resolved. Thanks! You guys run a tight ship :-)
Great, thank you for testing!
Expected behaviour
Text surrounded by two lines of triple tick-marks should behave as a code block.
Actual behaviour
If the code block happens to contain a PHP comment block, the closing triple-ticks are not recognised, and the rest of the document acts as if it was part of the code block. This breaks highlighting (in the editor window, at least) and breaks the note's automatic table of contents.
This code block breaks QownNotes as described above:
This behaviour was not observed until recently. I am not sure which release exactly introduced this behaviour, but sometime last month probably.
Steps to reproduce
It seems a slash followed by a star inside a code block is enough to produce this odd behaviour:
The rest of the text in the document will now behave as if it was still inside the code block.
Relevant log output in the Log panel
Expand
``` [09:11:22] [status] Stored 1 note(s) to disk ```Information about the application, settings and environment
Expand
QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Mon Jan 6 09:11:51 2020` **Version**: `20.1.2` **Build date**: `Jan 3 2020` **Build number**: `649` **Platform**: `linux` **Operating System**: `Ubuntu 18.04.3 LTS` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `Launchpad PPA` **Qt Version (build)**: `5.9.5` **Qt Version (runtime)**: `5.9.5` **Portable mode**: `no` **Settings path / key**: `/home/user/.config/PBE/QOwnNotes.conf` **Application database path**: `/home/user/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite` **Application arguments**: `QOwnNotes` **Qt Debug**: `0` **Locale (system)**: `en_US` **Locale (interface)**: *empty* **Primary screen resolution**: `1920x1200` **Screen resolution(s)**: **Icon theme**: `hicolor` **Notes in current note folder**: `537` **Calendar items**: `2` **Enabled scripts**: `0` ## Server Info **serverUrl**: `https://nc.domain.se` **appIsValid**: `yes` **notesPathExists**: `yes` **serverVersion**: `15.0.11.1` **appVersion**: *empty* ## Spellchecking **Enabled**: `true` **Selected language**: `en_US` **Language codes**: `en_US` **Language names**: `American English (United States)` **Application dictionaries path**: `/home/user/.local/share/PBE/QOwnNotes/dicts` ## Note folders **currentNoteFolderId**: `1` ### Note folder `default` **id**: `1` **isCurrent**: `yes` **activeTagId**: `0` **localPath**: `/home/user/nextcloud/Notes` **remotePath**: `Notes` **cloudConnectionId**: `1` **isShowSubfolders**: `yes` **isUseGit**: `no` **activeNoteSubFolder name**: `FM` **database file**: `/home/user/nextcloud/Notes/notes.sqlite` ## Cloud connections ### Cloud connection `Default` **id**: `1` **isCurrent**: `yes` **serverUrl**: `https://nc.domain.se` **username**: `user` ## Enabled scripts ## Settings **ActiveNoteHistoryItem** (NoteHistoryItem): `