Skip to content

Commit

Permalink
Update README and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
youming-lin committed Oct 3, 2017
1 parent 9c6bf21 commit 70d03bd
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 237 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ API documentation for `HTMLEntities` is located [here](https://ibm-swift.github.

## Version Info

Latest release of `HTMLEntities` requires Swift 3.
Latest release of `HTMLEntities` runs on Swift 3 and 4. Tested on Swift 3.1.1 and Swift 4.0 toolchains.

## Installation

### Via Swift Package Manager

Add `HTMLEntities` to your `Package.swift`:

Swift 3:

```swift
import PackageDescription

Expand All @@ -49,6 +51,21 @@ let package = Package(
)
```

Swift 4:

```swift
import PackageDescription

let package = Package(
name: "<package-name>",
...
dependencies: [
.package(url: "https://github.com/IBM-Swift/swift-html-entities.git", .upToNextMajor(from: "3.0.0")
]
// Also, make sure to add HTMLEntities to your package target's dependencies
)
```

### Via CocoaPods

Add `HTMLEntities` to your `Podfile`:
Expand Down
6 changes: 3 additions & 3 deletions docs/Enums.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ <h1>Enums</h1>
<li class="item">
<div>
<code>
<a name="/s:O12HTMLEntities10ParseError"></a>
<a name="/s:12HTMLEntities10ParseErrorO"></a>
<a name="//apple_ref/swift/Enum/ParseError" class="dashAnchor"></a>
<a class="token" href="#/s:O12HTMLEntities10ParseError">ParseError</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO">ParseError</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -123,7 +123,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-09-07)</p>
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-10-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
30 changes: 15 additions & 15 deletions docs/Enums/ParseError.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ <h1>ParseError</h1>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError26DeprecatedNumericReferenceFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO26DeprecatedNumericReferenceACSScACmF"></a>
<a name="//apple_ref/swift/Element/DeprecatedNumericReference" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError26DeprecatedNumericReferenceFMS0_FSSS0_">DeprecatedNumericReference</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO26DeprecatedNumericReferenceACSScACmF">DeprecatedNumericReference</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -129,9 +129,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError26DisallowedNumericReferenceFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO26DisallowedNumericReferenceACSScACmF"></a>
<a name="//apple_ref/swift/Element/DisallowedNumericReference" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError26DisallowedNumericReferenceFMS0_FSSS0_">DisallowedNumericReference</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO26DisallowedNumericReferenceACSScACmF">DisallowedNumericReference</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -166,9 +166,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError15IllegalArgumentFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO15IllegalArgumentACSScACmF"></a>
<a name="//apple_ref/swift/Element/IllegalArgument" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError15IllegalArgumentFMS0_FSSS0_">IllegalArgument</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO15IllegalArgumentACSScACmF">IllegalArgument</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -198,9 +198,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError21InvalidNamedReferenceFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO21InvalidNamedReferenceACSScACmF"></a>
<a name="//apple_ref/swift/Element/InvalidNamedReference" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError21InvalidNamedReferenceFMS0_FSSS0_">InvalidNamedReference</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO21InvalidNamedReferenceACSScACmF">InvalidNamedReference</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -231,9 +231,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError25MalformedNumericReferenceFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO25MalformedNumericReferenceACSScACmF"></a>
<a name="//apple_ref/swift/Element/MalformedNumericReference" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError25MalformedNumericReferenceFMS0_FSSS0_">MalformedNumericReference</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO25MalformedNumericReferenceACSScACmF">MalformedNumericReference</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -264,9 +264,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError16MissingSemicolonFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO16MissingSemicolonACSScACmF"></a>
<a name="//apple_ref/swift/Element/MissingSemicolon" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError16MissingSemicolonFMS0_FSSS0_">MissingSemicolon</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO16MissingSemicolonACSScACmF">MissingSemicolon</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -296,9 +296,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FO12HTMLEntities10ParseError24OutsideValidUnicodeRangeFMS0_FSSS0_"></a>
<a name="/s:12HTMLEntities10ParseErrorO24OutsideValidUnicodeRangeACSScACmF"></a>
<a name="//apple_ref/swift/Element/OutsideValidUnicodeRange" class="dashAnchor"></a>
<a class="token" href="#/s:FO12HTMLEntities10ParseError24OutsideValidUnicodeRangeFMS0_FSSS0_">OutsideValidUnicodeRange</a>
<a class="token" href="#/s:12HTMLEntities10ParseErrorO24OutsideValidUnicodeRangeACSScACmF">OutsideValidUnicodeRange</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -329,7 +329,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-09-07)</p>
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-10-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/Extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-09-07)</p>
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-10-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
96 changes: 9 additions & 87 deletions docs/Extensions/String.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ <h1>String</h1>
<li class="item">
<div>
<code>
<a name="/s:VE12HTMLEntitiesSS17HTMLEscapeOptions"></a>
<a name="/s:SS12HTMLEntitiesE17HTMLEscapeOptionsV"></a>
<a name="//apple_ref/swift/Struct/HTMLEscapeOptions" class="dashAnchor"></a>
<a class="token" href="#/s:VE12HTMLEntitiesSS17HTMLEscapeOptions">HTMLEscapeOptions</a>
<a class="token" href="#/s:SS12HTMLEntitiesE17HTMLEscapeOptionsV">HTMLEscapeOptions</a>
</code>
</div>
<div class="height-container">
Expand All @@ -121,9 +121,9 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:FE12HTMLEntitiesSS10htmlEscapeFT18allowUnsafeSymbolsSb7decimalSb16encodeEverythingSb18useNamedReferencesSb_SS"></a>
<a name="/s:SS12HTMLEntitiesE10htmlEscapeSSSb18allowUnsafeSymbols_Sb7decimalSb16encodeEverythingSb18useNamedReferencestF"></a>
<a name="//apple_ref/swift/Method/htmlEscape(allowUnsafeSymbols:decimal:encodeEverything:useNamedReferences:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE12HTMLEntitiesSS10htmlEscapeFT18allowUnsafeSymbolsSb7decimalSb16encodeEverythingSb18useNamedReferencesSb_SS">htmlEscape(allowUnsafeSymbols:decimal:encodeEverything:useNamedReferences:)</a>
<a class="token" href="#/s:SS12HTMLEntitiesE10htmlEscapeSSSb18allowUnsafeSymbols_Sb7decimalSb16encodeEverythingSb18useNamedReferencestF">htmlEscape(allowUnsafeSymbols:decimal:encodeEverything:useNamedReferences:)</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -156,74 +156,15 @@ <h4>Declaration</h4>

</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>allowUnsafeSymbols</em>
</code>
</td>
<td>
<div>
<p>Specifies if all ASCII characters should be skipped
when escaping text. <em>Optional</em></p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>decimal</em>
</code>
</td>
<td>
<div>
<p>Specifies if decimal escapes should be used instead of
hexadecimal escapes. <em>Optional</em></p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>encodeEverything</em>
</code>
</td>
<td>
<div>
<p>Specifies if all characters should be escaped, even if
some are safe characters. <em>Optional</em></p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>useNamedReferences</em>
</code>
</td>
<td>
<div>
<p>Specifies if named character references
should be used whenever possible. <em>Optional</em></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FE12HTMLEntitiesSS12htmlUnescapeFzT6strictSb_SS"></a>
<a name="/s:SS12HTMLEntitiesE12htmlUnescapeSSSb6strict_tKF"></a>
<a name="//apple_ref/swift/Method/htmlUnescape(strict:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE12HTMLEntitiesSS12htmlUnescapeFzT6strictSb_SS">htmlUnescape(strict:)</a>
<a class="token" href="#/s:SS12HTMLEntitiesE12htmlUnescapeSSSb6strict_tKF">htmlUnescape(strict:)</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -254,34 +195,15 @@ <h4>Declaration</h4>

</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>strict</em>
</code>
</td>
<td>
<div>
<p>Specifies if escapes MUST always end with <code>;</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FE12HTMLEntitiesSS12htmlUnescapeFT_SS"></a>
<a name="/s:SS12HTMLEntitiesE12htmlUnescapeSSyF"></a>
<a name="//apple_ref/swift/Method/htmlUnescape()" class="dashAnchor"></a>
<a class="token" href="#/s:FE12HTMLEntitiesSS12htmlUnescapeFT_SS">htmlUnescape()</a>
<a class="token" href="#/s:SS12HTMLEntitiesE12htmlUnescapeSSyF">htmlUnescape()</a>
</code>
</div>
<div class="height-container">
Expand Down Expand Up @@ -320,7 +242,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-09-07)</p>
<p>&copy; 2017 <a class="link" href="https://github.com/IBM-Swift/swift-html-entities" target="_blank" rel="external">IBM</a>. All rights reserved. (Last updated: 2017-10-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
Loading

0 comments on commit 70d03bd

Please sign in to comment.