-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): support comments in document header (#917)
keeps the `toc` and other document attributes attached to the header, even when there are single line comments and block comments, making them available later during processing of Table of Contents, for example. fixes #916 Signed-off-by: Xavier Coulon <[email protected]>
- Loading branch information
Showing
10 changed files
with
8,520 additions
and
7,925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -353,7 +353,8 @@ John Foo Doe <[email protected]>; Jane the_Doe <[email protected]>` | |
expected := &types.Document{ | ||
Elements: []interface{}{ | ||
&types.DocumentHeader{ | ||
Title: Title, | ||
Title: Title, | ||
Elements: nil, // single comment is filtered out | ||
}, | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.