Closed dloic closed 3 years ago
Merging #255 (71cd933) into master (2524b62) will increase coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #255 +/- ##
==========================================
+ Coverage 91.29% 91.31% +0.01%
==========================================
Files 60 60
Lines 1057 1059 +2
==========================================
+ Hits 965 967 +2
Misses 92 92
Impacted Files | Coverage Δ | |
---|---|---|
...es/Down/AST/Visitors/AttributedStringVisitor.swift | 91.66% <100.00%> (+0.14%) |
:arrow_up: |
...es/Down/AST/Visitors/ListItemPrefixGenerator.swift | 100.00% <100.00%> (ø) |
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 2524b62...71cd933. Read the comment docs.
Hi @johnxnguyen! Not sure who should be reviewing this one :)
I've checked the Travis CI build error, seems related to log file length, I cannot see the error. Do you confirm?
Hey @dloic , thanks for the PR! I'll try to take a look at this tonight and get back to you soon.
@johnxnguyen thanks a lot!
I've checked the Travis CI build error, seems related to log file length, I cannot see the error. Do you confirm?
@dloic hmm apparently Travis enforces a 4MB log length limit, it's the first time I've seen this issue though. Try to add the - quiet
option at the end of the three xcodebuild
commands in the travis config file, that should shrink the log output sufficiently.
@johnxnguyen Thanks for the review. Branch updated taking into account all your feedback. I did also tweak the travis script as suggested. Let see the result!
Updated usage of the new feature with builder as closure:
let visitor = AttributedStringVisitor(
styler: DownStyler(),
options: .default,
listPrefixGeneratorBuilder: { CustomListItemPrefixGenerator(list: $0) }
)
Thanks to you @johnxnguyen for the review and approval! There is no rush, but I was wondering if you plan to do a new release for the new changes.
I will draft a new release likely by the end of this week.
Perfect, thanks a lot!
FYI @dloic this has been release. Thanks again for the contribution!
After investigation, I've tried to find the least intrusive way to add the feature of custom list prefixes for AttributedStringVisitor. I've decided to go for ListItemPrefixgenerator changes, as fitting the feature in the styler was not possible.
The PR is not changing the current behavior, but opening a bit the API so one can provide another implementation. See below for an example:
Definition of a custom ListPrefixGenerator:
Usage:
Render: