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

heading 2 becomes heading 1 #7

Open
timvink opened this issue Mar 9, 2020 · 2 comments
Open

heading 2 becomes heading 1 #7

timvink opened this issue Mar 9, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@timvink
Copy link
Collaborator

timvink commented Mar 9, 2020

While writing unit tests, I noticed that:

# one
### two
## three

Will lead to ## three becoming a <h1>. (see screenshot below).

Is that intended behaviour? I have not enabled strict_mode.

imageimage

@timvink
Copy link
Collaborator Author

timvink commented Mar 9, 2020

Thinking about this a bit more. Does it actually make sense to have two modes:

strict_mode: When set to True it will follow the headings order strictly. You must start writing documents from h1, and cannot skip headings (such as # title1\n### title2\n).

As in:

# title
### title 2
## title 3

Should always produce:

# 1. title
### 1.1.1 title 2
## 1.2 title 3

Or am I missing something?

@ignorantshr
Copy link
Owner

   When I was writing the code, I didn't expect this to happen. This is indeed a bug.Please help me fix it.
   As for Strict Mode, my idea is that once the above happens, the number will stop from where the disorder has occurred. This applies to situations where you write something like something at the end of the article, rather than want to number.

@ignorantshr ignorantshr added the bug Something isn't working label Mar 10, 2020
@ignorantshr ignorantshr assigned ignorantshr and unassigned timvink Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants