mattt / CommonMarkAttributedString

Create NSAttributedStrings from Markdown Text
MIT License
424 stars 19 forks source link

Fix build with latest CommonMark (0.3.0) #4

Closed finestructure closed 4 years ago

finestructure commented 4 years ago

Just stumbled across this when trying to create a playground with CommonMarkAttributed String:

/Users/sas/Downloads/cm-test/.build/checkouts/CommonMarkAttributedString/Sources/CommonMarkAttributedString/CommonMark+Extensions.swift:40:63: error: use of undeclared type 'HTML'
            guard !container.children.contains(where: { $0 is HTML }) else {

Not an issue in the repo itself because CommonMark is pinned to 0.2.2 but on swift package update it would break, I believe.

When using this repo here as a dependency, CommonMark will not be pinned and currently does not compile (unless manually pinned to 0.2.2 as well).

mattt commented 4 years ago

Thanks for pointing out this problem and providing a fix, @finestructure — I really appreciate it. My use of from (unqualified >) instead of upToMinor (~>) was an unintentional mistake. I decided to resolve this in two steps: first by pinning the dependency (6829676b0cefba7e653f0c72d6c958da53e4acee / 0.1.1) and then updating the dependency (d16f323b631cfcfd357b30ca4f95c5115d376efa / part of 0.2.0).