-
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
feat(parser): custom substitutions on paragraphs #749
Merged
xcoulon
merged 1 commit into
bytesparadise:master
from
xcoulon:Issue597_custom_subs_paragraphs
Sep 6, 2020
Merged
feat(parser): custom substitutions on paragraphs #749
xcoulon
merged 1 commit into
bytesparadise:master
from
xcoulon:Issue597_custom_subs_paragraphs
Sep 6, 2020
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
Codecov Report
@@ Coverage Diff @@
## master #749 +/- ##
==========================================
- Coverage 84.79% 83.53% -1.27%
==========================================
Files 77 77
Lines 5296 5605 +309
==========================================
+ Hits 4491 4682 +191
- Misses 507 586 +79
- Partials 298 337 +39 |
xcoulon
force-pushed
the
Issue597_custom_subs_paragraphs
branch
from
September 5, 2020 16:20
0881f41
to
5e2ed38
Compare
Using multiple substitutions to parse the paragraph content and support custom substitutions via the `subs` attribute. Some grammar rules have been simplified. For example, the content of a quoted text can only be other quoted texts or plain chararacters. Using "placeholder" elements to support parsing of complex elements in which previously elements were identified. For example, a link may contain quoted text as attributes, quoted test may contain special characters, etc. Also, introducing a new `ElementRole` type, since attributes may contain special characters which would be rendered differently, depending on the backend. However, this may need more work in the future (expand to other attributes with somethig generic?) Sadly, all these changes also have an impact on the performances, so further investigation may be required, to see if optimizations can be found. Fixes bytesparadise#597 Signed-off-by: Xavier Coulon <[email protected]> WIP update tests after rebasing Signed-off-by: Xavier Coulon <[email protected]> WIP - with quotedtext placeholder Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
force-pushed
the
Issue597_custom_subs_paragraphs
branch
from
September 5, 2020 16:22
5e2ed38
to
b1e4bbb
Compare
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this pull request
Sep 27, 2020
applying the same logic as with paragraphs to apply default and custom substitutions on delimited blocks. This means that delimited blocks are processed in multiple steps, but each step has a much simpler grammar. Also, quite a lot of refactoring and code reorganization for the delimited block tests in `pkg/parser`. See bytesparadise#749 Fixes bytesparadise#558 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this pull request
Sep 28, 2020
applying the same logic as with paragraphs to apply default and custom substitutions on delimited blocks. This means that delimited blocks are processed in multiple steps, but each step has a much simpler grammar. Also, quite a lot of refactoring and code reorganization for the delimited block tests in `pkg/parser`. See bytesparadise#749 Fixes bytesparadise#558 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this pull request
Sep 28, 2020
applying the same logic as with paragraphs to apply default and custom substitutions on delimited blocks. This means that delimited blocks are processed in multiple steps, but each step has a much simpler grammar. Also, quite a lot of refactoring and code reorganization for the delimited block tests in `pkg/parser`. See bytesparadise#749 Fixes bytesparadise#558 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this pull request
Sep 28, 2020
applying the same logic as with paragraphs to apply default and custom substitutions on delimited blocks. This means that delimited blocks are processed in multiple steps, but each step has a much simpler grammar. Also, quite a lot of refactoring and code reorganization for the delimited block tests in `pkg/parser`. See bytesparadise#749 Fixes bytesparadise#558 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
that referenced
this pull request
Sep 28, 2020
applying the same logic as with paragraphs to apply default and custom substitutions on delimited blocks. This means that delimited blocks are processed in multiple steps, but each step has a much simpler grammar. Also, quite a lot of refactoring and code reorganization for the delimited block tests in `pkg/parser`. See #749 Fixes #558 Signed-off-by: Xavier Coulon <[email protected]>
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.
Using multiple substitutions to parse the paragraph content
and support custom substitutions via the
subs
attribute.Some grammar rules have been simplified. For example, the
content of a quoted text can only be other quoted texts or
plain chararacters.
Using "placeholder" elements to support parsing of complex
elements in which previously elements were identified. For
example, a link may contain quoted text as attributes, quoted
test may contain special characters, etc.
Also, introducing a new
ElementRole
type, since attributesmay contain special characters which would be rendered differently,
depending on the backend.
However, this may need more work in the future (expand to
other attributes with somethig generic?)
Sadly, all these changes also have an impact on the performances,
so further investigation may be required, to see if optimizations
can be found.
Fixes #597
Signed-off-by: Xavier Coulon [email protected]
WIP update tests after rebasing
Signed-off-by: Xavier Coulon [email protected]
WIP - with quotedtext placeholder
Signed-off-by: Xavier Coulon [email protected]