-
Notifications
You must be signed in to change notification settings - Fork 25
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
refactor(types/parser): parse by fragment and process in pipeline #855
Merged
xcoulon
merged 12 commits into
bytesparadise:master
from
xcoulon:Issue843_refactor_parser_raw_fragment_blocks_parse_fragments
Nov 20, 2021
Merged
refactor(types/parser): parse by fragment and process in pipeline #855
xcoulon
merged 12 commits into
bytesparadise:master
from
xcoulon:Issue843_refactor_parser_raw_fragment_blocks_parse_fragments
Nov 20, 2021
Conversation
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
Fragments are blocks of contiguous lines separated by blank lines. Blank lines within delimited blocks are preserved (hence they do not split the fragments) Once a fragment is read, it is sent on a channel to be processed by the next stages of the pipeline until the aggregator which combines all the fragments into the resulting `types.Document`, which can thn be rendered Also: - removed tests in "raw documents" for quoted text, since it has little to no value. BREAKING CHANGE: - using pointers on all structs in `pkg/types` - removing `types.Document.Attributes`, holding attributes in context as parsing/rendering progresses. - `types.Paragraph.Lines` (`[][]interface{}`) is replaced by `types.Paragraph.Elements` (`[]interface{}`) - all delimited blocks types are merged into `types.DelimitedBlock` - all lists are merged into `types.List` - removed the `Level` field in `types.ListElement` struct - refactor document structure with header (level 0) and sections (level 1 to 5) Fixes bytesparadise#843 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
force-pushed
the
Issue843_refactor_parser_raw_fragment_blocks_parse_fragments
branch
from
November 14, 2021 08:35
4194681
to
78a9120
Compare
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #855 +/- ##
==========================================
+ Coverage 78.78% 80.16% +1.38%
==========================================
Files 88 85 -3
Lines 5289 6499 +1210
==========================================
+ Hits 4167 5210 +1043
- Misses 694 806 +112
- Partials 428 483 +55 |
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
Signed-off-by: Xavier Coulon <[email protected]>
FWIW, running the benchs in libasciidoc_bench_test.go compared to the code tagged v0.6.0 gives the following improvements (via
|
xcoulon
deleted the
Issue843_refactor_parser_raw_fragment_blocks_parse_fragments
branch
November 20, 2021 07:53
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fragments are blocks of contiguous lines separated by blank lines.
Blank lines within delimited blocks are preserved (hence they do not
split the fragments)
Once a fragment is read, it is sent on a channel to be processed
by the next stages of the pipeline until the aggregator which combines
all the fragments into the resulting
types.Document
, whichcan then be rendered
BREAKING CHANGES:
pkg/types
types.Document.Attributes
, holding attributes in contextas parsing/rendering progresses.
types.Paragraph.Lines
([][]interface{}
) is replaced bytypes.Paragraph.Elements
([]interface{}
)types.DelimitedBlock
types.List
Level
field intypes.ListElement
structsections (level 1 to 5)
Fixes #843
Signed-off-by: Xavier Coulon [email protected]