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 issue where command before level 1 heading was ignored #77

Merged
merged 2 commits into from
Dec 29, 2020

Conversation

jacobdeichert
Copy link
Owner

The command before a level 1 heading wasn't being pushed into the array of commands (line 26 in the parser).

However, after the parser is done, the last command was correctly being added to the list of commands. The problem was that when a level 1 heading is found, that last command is overwritten and lost.

Which issue does this fix?

Closes #75

Describe the solution

I decided that if we see another level 1 heading within the document, the parser should stop (break) there. Anything below that level 1 heading will be ignored... so that might be a good place to put documentation or other content.

The command before the level 1 heading wasn't being pushed into the array of commands (line 26 in the parser).

However, after the parser is done, the last command is correctly added to the list of commands. So I decided that if we see another level one heading within the document, the parser should stop (break) there.
@jacobdeichert jacobdeichert merged commit 9e13d64 into master Dec 29, 2020
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.

Subcommand not recognized if followed by a # HEADER line
1 participant