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

FIX: (adoc-promote): headings get wrongfully turned into sub-type 2 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fapdash
Copy link

@fapdash fapdash commented Jul 30, 2021

If the heading contains whitespace or a newline after the
heading title it gets turned into a sub-type 2 heading.

  • add failing tests
  • fix issue by throwing away whitespace in match group 3

In theory we could change the regex but a comment indicates that some other logic depends on the newline being matched, but I didn't investigate further:

adoc-mode/adoc-mode.el

Lines 689 to 691 in c0906ff

;; using \n instad $ is important so group 3 is guaranteed to be at least 1
;; char long (except when at the end of the buffer()). That is important to
;; to have a place to put the text property adoc-reserved on.

If the heading contains whitespace or a newline after the
heading title it gets turned into a sub-type 2 heading.

- add failing tests
- fix issue by throwing away whitespace in match group 3
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.

1 participant