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

Orgmode fixes and improvements, closes #2405 #2504

Merged
merged 2 commits into from
Jan 18, 2025
Merged

Conversation

nyxkn
Copy link
Contributor

@nyxkn nyxkn commented Jan 9, 2025

Adding ReplacePatternGenerator file for orgmode.
We need this to set more correct patterns for orgmode lists and headings, which are different to markdown ones.

Fixes action buttons behaviour for ordered/unordered/checkbox lists, which was previously incorrect.
Fixes checkbox list to only use uppercase X as per orgmode specs (closes #2405 )
Fixes newlines autoindent. It now follow the correct pattern for lists, instead of following markdown patterns
Fixes headings being bolded from level 3 onwards, i.e. *** heading was having *** become bold since it's the same delimiter for bold, but we don't want that. More generically, we prevent emphasizing a pattern if it's made entirely of the delimiter character, e.g. *** or ///
Fixes heading being highlighted across newlines. i.e. * \n heading was being treated as heading, but only whitespace should be allowed between asterisks and heading text, not newline.

We're also adding heading action buttons.

nyxkn added 2 commits January 9, 2025 07:45
we need this to set more correct patterns for orgmode lists and headings, which are
different to markdown ones

fix action button behaviour on unordered and ordered lists

fix checkbox to only use uppercase X as per orgmode specs

add heading action buttons
more generically, prevent emphasizing a pattern if it's made entirely of
the delimiter character

also fix heading and comments being highlighted across newlines
we were using \s but what we really want is whitespace only
and \s also matches newline

orgmode headings can also be any depth, unlike markdown 1-6
@nyxkn nyxkn marked this pull request as ready for review January 9, 2025 11:07
@gsantner gsantner self-requested a review January 18, 2025 17:33
@gsantner gsantner assigned gsantner and nyxkn and unassigned gsantner Jan 18, 2025
@gsantner gsantner added this to the Markor v2.14 milestone Jan 18, 2025
@gsantner gsantner changed the title Orgmode fixes and improvements Orgmode fixes and improvements, closes #2405 Jan 18, 2025
Copy link
Owner

@gsantner gsantner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes!

@gsantner gsantner merged commit 57792f2 into gsantner:master Jan 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Org Mode check list button inserts lowercase X
2 participants