fix(compare): improve paragraph equality logic / reduce testdata(markdown pages)#243
Merged
fix(compare): improve paragraph equality logic / reduce testdata(markdown pages)#243
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Code Metrics Report
Details | | main (ab90487) | #243 (e0508c7) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 35.6% | 35.7% | +0.0% |
| Files | 16 | 16 | 0 |
| Lines | 2272 | 2275 | +3 |
+ | Covered | 811 | 814 | +3 |
- | Code to Test Ratio | 1:0.9 | 1:0.9 | -0.1 |
| Code | 4606 | 4615 | +9 |
| Test | 4170 | 4170 | 0 |
+ | Test Execution Time | 9s | 8s | -1s |Code coverage of files in pull request scope (58.1% → 59.2%)
Reported by octocov |
This file contains hidden or 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
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.
This pull request introduces changes to improve the comparison logic in
compare.goand updates multiple Markdown test data files to include a new layout metadata. The key updates include refining the equality check for paragraphs and fragments, adding a new import dependency, and appending metadata to test files for layout consistency.Updates to
compare.go:Bold,Italic,Link, andCodeare checked individually. SoftLineBreak and ClassName are excluded from the comparison.stringspackage import:stringspackage to facilitate trimming operations during fragment comparison.Updates to Markdown test data files:
<!-- {"layout":"title-and-body"} -->metadata:testdata/autolink.md,testdata/blockquote.md,testdata/bold_and_italic.md,testdata/br.md,testdata/code.md, and others, to ensure consistent rendering in tests. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]