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

adoc-promote: one-line section headings always get turned into sub-type 2 headings #3

Open
fapdash opened this issue Jul 28, 2021 · 0 comments

Comments

@fapdash
Copy link

fapdash commented Jul 28, 2021

Reproduction

Peek.2021-07-29.01-22.mp4
= Heading 1
  1. Put cursor on heading
  2. Execute adoc-promote

Expected

== Heading 1

Actual

== Heading 1 ==

Explanation

This is caused by

(setq sub-type (if (< 0 (length (match-string 3))) 2 1))

(match-string 3) returns "\n", the length is larger than 0 and it always evaluates to sub-type 2.

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

No branches or pull requests

1 participant