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

Add TOML highlighting support #217

Merged
merged 6 commits into from
Feb 7, 2025
Merged

Conversation

LockeBirdsey
Copy link
Contributor

Tried my best to add TOML support. Everything is there except for multiline string handling, i.e

bigString = """
this is a multi
line string
"""

After some investigation and experimentation, it seems that when doing multiple ''' or """ while also switching between two block states, it will just fail silently (at least I couldn't find where it stopped trying to render). The highlightStringLiteral function seems to clash but even disabling that in TOML mode, I sill encountered this issue.

@pbek
Copy link
Owner

pbek commented Feb 7, 2025

Thank you very much! Seems to work nicely! 👍️

@pbek pbek merged commit 73e6cc3 into pbek:main Feb 7, 2025
22 checks passed
pbek added a commit to pbek/QOwnNotes that referenced this pull request Feb 7, 2025
@pbek
Copy link
Owner

pbek commented Feb 7, 2025

25.2.3

  • The GDScript support in the note edit code block syntax highlighter was improved
    to support $NodePath and %UniqueNode constructs highlighted as literals
    (for #216, thank you, @DarienMC)
  • Added TOML support to the note edit code block syntax highlighter
    (for #217, thank you, @DarienMC)

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

@LockeBirdsey
Copy link
Contributor Author

25.2.3

* The GDScript support in the note edit code block syntax highlighter was improved
  to support `$NodePath` and `%UniqueNode` constructs highlighted as literals
  (for [#216](https://github.com/pbek/qmarkdowntextedit/pull/216), thank you, @DarienMC)

* Added TOML support to the note edit code block syntax highlighter
  (for [#217](https://github.com/pbek/qmarkdowntextedit/pull/217), thank you, @DarienMC)

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

Yep it works as intended!

@LockeBirdsey LockeBirdsey deleted the addTomlHighlightSupport branch February 8, 2025 05:14
@pbek
Copy link
Owner

pbek commented Feb 8, 2025

Great, thank you for testing!

@DarienMC
Copy link
Contributor

DarienMC commented Feb 8, 2025

I noticed that I was mistakenly given credit for TOML support in the newest version release notes, when this was actually @LockeBirdsey who contributed. Is it possible to edit the typo? Thank you

image

@pbek
Copy link
Owner

pbek commented Feb 8, 2025

Oh! Thank you for mentioning!

pbek added a commit to pbek/QOwnNotes that referenced this pull request Feb 8, 2025
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.

3 participants