Skip to content

Commit a6cd4d6

Browse files
committed
add tests & bump version
1 parent fb2264b commit a6cd4d6

16 files changed

+28
-22
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ The chart above shows the elapsed time (in seconds) to render different HTML str
4848

4949
- File > Swift Packages > Add Package Dependency
5050
- Add `https://github.com/ZhgChgLi/ZMarkupParser.git`
51-
- Select "Up to Next Major" with "1.5.2"
51+
- Select "Up to Next Major" with "1.6.0"
5252

5353
or
5454

5555
```swift
5656
...
5757
dependencies: [
58-
.package(url: "https://github.com/ZhgChgLi/ZMarkupParser.git", from: "1.5.2"),
58+
.package(url: "https://github.com/ZhgChgLi/ZMarkupParser.git", from: "1.6.0"),
5959
]
6060
...
6161
.target(
@@ -74,7 +74,7 @@ platform :ios, '12.0'
7474
use_frameworks!
7575

7676
target 'MyApp' do
77-
pod 'ZMarkupParser', '~> 1.5.2'
77+
pod 'ZMarkupParser', '~> 1.6.0'
7878
end
7979
```
8080

Sources/ZMarkupParser/HTML/Processor/HTMLTagAttributeToMarkupStyleVisitor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ struct HTMLTagStyleAttributeToMarkupStyleVisitor: HTMLTagStyleAttributeVisitor {
127127
return .justified
128128
case "natural":
129129
return .natural
130-
case "right":
130+
case "right", "start":
131131
return .right
132-
case "left":
132+
case "left", "end":
133133
return .left
134134
default:
135135
return nil

Tests/ZMarkupParserSnapshotTests/ZMarkupParserSnapshotTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ final class ZHTMLToNSAttributedStringSnapshotTests: XCTestCase {
6363
precode
6464
precode2
6565
</code></pre>
66+
<div style="text-align: right;">
67+
ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.ZMarkupParser is a pure-Swift library that helps you convert HTML strings into NSAttributedString with customized styles and tags.
68+
</div>
6669
&lt;font color="#008000;"&gt;Test&nbsp;XXX&lt;/font&gt;
6770
"""
6871

Loading
Loading
124 KB
Loading
124 KB
Loading
149 KB
Loading
148 KB
Loading
148 KB
Loading

0 commit comments

Comments
 (0)