Skip to content

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