Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZimWiki: Syntax highlighting for code, global setting #1434

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

fredericjacob
Copy link
Contributor

This PR adds the same functionality for ZimWiki for highlighting/formatting code which is already present for Markdown.

Before, code (inline and blocks) was always formatted as monospace, which led to severe performance problems in larger files with a lot of code samples.

Now, formatting code as monospace is optional (and turned off by default), but code is highlighted with gray background color (like for markdown). There's also the option to disable highlighting.

grafik
grafik

@gsantner
Copy link
Owner

Can you please move the setting to editmode -> syntay hl? So one setting that is applied to all formats. Intlstead of introducing duplicate for zim.

@fredericjacob
Copy link
Contributor Author

Yes, I will change this. 👍

By the way, how about also moving the markdown table of contents setting to the general view mode settings? As zim view mode makes use of the MarkdownTextConverter, the setting affects both markdown and zim table of contents. (I can create a separate PR for this if you like)

@gsantner
Copy link
Owner

gsantner commented Sep 12, 2021

toc is under rework, dont touch now

…he general editor settings

(use common settings for both markdown and zim wiki now)
@fredericjacob
Copy link
Contributor Author

fredericjacob commented Sep 12, 2021

Et voilà, I moved both settings to the general "Editor > Syntax Highlighting" section, they are now commonly used by markdown and zim wiki.

grafik

toc is under rework, dont touch now

Ah okay, didn't know that the table of contents is worked on at the moment, is there some PR or are you just doing some changes? Then it could make sense to just keep the inconsistent TOC setting location in mind and consider moving it in the future (to make more clear that it's used by markdown and zim)

@gsantner gsantner changed the title ZimWiki: Introduce background color for code and make monospace formatting and highlighting optional ZimWiki: Syntax highlighting for code, global setting Sep 13, 2021
@gsantner gsantner merged commit 3bc417c into gsantner:master Sep 13, 2021
@gsantner gsantner added this to the 2.9 milestone Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants