pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.69k stars 414 forks source link

[F] Consider #s before headers as masked syntax #2321

Closed FireFragment closed 2 years ago

FireFragment commented 2 years ago

Expected behaviour

It would be nice, if there was an option in settings to consider #s preceeding atx-style headers as masked syntax and not as part of a header.

It would allow to style #s differently, than the header itself.

Actual behaviour

As far as I know, there isn't any option to consider #s preceeding atx-style headers as masked syntax.

pbek commented 2 years ago

Can you please post some code examples and references who is using Markdown that way?

FireFragment commented 2 years ago

We currently have this: 31 I would like there was some way, to make theese #s gray. Most of editors I know (Abricotine, StackEdit, etc.) styles theese #s differently then the headers themselves.

StackEdit: 32

P. S: Thanks for a quick response :-)

pbek commented 2 years ago

@Waqar144, your opinion?

pbek commented 2 years ago

Abricotine, StackEdit, etc

Haven't heard of them. The ones I use (all JetBrains IDEs, VS Code, kate, ...) don't use masked syntax for the #s. But that doesn't mean I oppose the idea per se...

pbek commented 2 years ago

Actually that even was a thing says:

@Waqar144, do you know why (and when) we stopped doing that?

Waqar144 commented 2 years ago

It probably got lost during the rewrite of the highlighter. But I think it should be fairly easy to add it back. I did try to keep most of the masked syntaxes working, so there's likely code for it already, but probably not working for some reason

pbek commented 2 years ago

I'll use the "masked syntax" styling, but the size of the styling of the heading. Looks like this:

image
pbek commented 2 years ago

21.12.1

There now is a new release, could you please test it and report if it works for you?

FireFragment commented 2 years ago

Works perfectly, thank you! 👍🏻

pbek commented 2 years ago

Great, thank you for testing!