quill-delta-dart
quill-delta-dart copied to clipboard
Iterator peek next
Please review. Some changes may be better done in another way.
This PR is needed to support Markdown auto formatting rules in Notus.
I can move the extension in Notus. No issue. I believe they should just exist somewhere cause they are a pain in the ass to write.
I did implement peek before but it makes the code that uses it hard to grok.
And peek now is:
Final newIter = iter.clone()
newIter.next()
Also I believe skipToBeginningOfLineBeforeIndex would be more optimised if we skip to index and then look backward. Otherwise we look for \n on every single line from start of doc.
For EOF I like the idea too. Will implement in a future PR. I came to it cause the doc on DeltaItarator.next was incorrect, so I reimplement by mistake what the doc was saying...then had to fix the test in Notus and noticed it was all making more sense 😅
Codecov Report
Merging #26 (b8c13d5) into master (4846633) will decrease coverage by
10.48%
. The diff coverage is43.75%
.
:exclamation: Current head b8c13d5 differs from pull request most recent head c950b1b. Consider uploading reports for the commit c950b1b to get more accurate results
@@ Coverage Diff @@
## master #26 +/- ##
===========================================
- Coverage 93.56% 83.08% -10.49%
===========================================
Files 1 1
Lines 342 396 +54
===========================================
+ Hits 320 329 +9
- Misses 22 67 +45
Impacted Files | Coverage Δ | |
---|---|---|
lib/quill_delta.dart | 83.08% <43.75%> (-10.49%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4846633...c950b1b. Read the comment docs.