QOwnNotes icon indicating copy to clipboard operation
QOwnNotes copied to clipboard

[FEATURE] Add console block highlight

Open alexminder opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

There no code highlight for console content. Bash,shell and console is not the same.

Describe the solution you'd like

For example, Github render engine supports console block identifier:

```console
foo@bar:~$ whoami
foo
```

image

It listed in https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml#L6782

alexminder avatar Sep 01 '24 09:09 alexminder

The code block highlighting is part of https://github.com/pbek/qmarkdowntextedit.

You could look at the bash highlighting and use that as a starting point: https://github.com/pbek/qmarkdowntextedit/blob/48d602b174ac5f6600149b3874b00a01553bda94/markdownhighlighter.cpp#L336

The last language contribution was this commit, it could also serve as a good example of what to do: https://github.com/pbek/qmarkdowntextedit/commit/8157cd6f14b64d806605a11c8ff98d848ed18c2c

pbek avatar Sep 01 '24 17:09 pbek