Skip to content
Permalink
Browse files

Update for Swift 5 changes

  • Loading branch information...
alexaubry committed Apr 27, 2019
1 parent 39ee612 commit b6f82382bba2b5b9131eb8634d41d19a8968cf20
Showing with 28 additions and 117 deletions.
  1. +3 −3 .generate-docs.sh
  2. +1 −1 .swift-version
  3. +0 −52 .travis.yml
  4. +6 −0 CHANGELOG.md
  5. +4 −2 HTMLString.podspec
  6. +0 −18 HTMLString.xcodeproj/project.pbxproj
  7. +1 −1 LICENSE
  8. +4 −23 README.md
  9. +9 −17 Sources/HTMLString/Mappings.swift
@@ -3,15 +3,15 @@ set -e

MODULE_VERSION=$1
OUTPUT=$2
SWIFT_VERSION="4.0"
SWIFT_VERSION="5.0"
AUTHOR="Alexis Aubry"
AUTHOR_URL="https://twitter.com/_alexaubry"
MODULE_NAME="HTMLString"
COPYRIGHT="Copyright © 2017 $AUTHOR. Available under the MIT License."
COPYRIGHT="Copyright © 2016 - present $AUTHOR. Available under the MIT License."
GITHUB_URL="https://github.com/alexaubry/HTMLString"
GH_PAGES_URL="https://alexaubry.github.io/HTMLString"

jazzy \
bundle exec jazzy \
--swift-version $SWIFT_VERSION \
-a "$AUTHOR" \
-u "$AUTHOR_URL" \
@@ -1 +1 @@
4.1
5.0

This file was deleted.

@@ -1,5 +1,11 @@
# Updates to HTMLString

## 🔖 v5.0.0 — [Date TBD]

- Swift 5 support
- Improve unescaping algorithm speed
- Add mutable methods

## 🔖 v4.0.1 — 2018-05-08

- Update project for Xcode 9.3
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "HTMLString"
s.version = "4.0.2"
s.version = "5.0.0"
s.summary = "Escape and unescape HTML entities in Swift"
s.description = <<-DESC
HTMLString is a fast library written in Swift that enables your program to add and remove HTML entities in Strings. It supports both ASCII and Unicode. You can use it with 2125 named (`&amp;`), decimal (`&#128;`) and hexadecimal (`&#x1F643;`) entities. It has native support for Swift's Extended Grapheme Clusters. Fully unit tested and documented.
DESC

s.homepage = "https://github.com/alexaubry/HTMLString"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Alexis Aubry Radanovic" => "me@alexaubry.fr" }
s.author = { "Alexis Aubry" => "me@alexaubry.fr" }
s.social_media_url = "https://twitter.com/_alexaubry"

s.ios.deployment_target = "8.0"
@@ -19,4 +19,6 @@ DESC
s.source = { :git => "https://github.com/alexaubry/HTMLString.git", :tag => "#{s.version}" }
s.source_files = "Sources/HTMLString/*.swift"
s.documentation_url = "https://alexaubry.github.io/HTMLString/"

s.swift_version = "5.0"
end
@@ -10,10 +10,6 @@
55BFFFD71F59574E00F13633 /* TestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BFFFD61F59574E00F13633 /* TestData.swift */; };
55BFFFD81F59574E00F13633 /* TestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BFFFD61F59574E00F13633 /* TestData.swift */; };
55BFFFD91F59574E00F13633 /* TestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BFFFD61F59574E00F13633 /* TestData.swift */; };
5E0A736B224CFC2300DCD41D /* HTMLEscapes.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5E0A736A224CFC2300DCD41D /* HTMLEscapes.plist */; };
5E0A736C224CFC2300DCD41D /* HTMLEscapes.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5E0A736A224CFC2300DCD41D /* HTMLEscapes.plist */; };
5E0A736D224CFC2300DCD41D /* HTMLEscapes.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5E0A736A224CFC2300DCD41D /* HTMLEscapes.plist */; };
5E0A736E224CFC2300DCD41D /* HTMLEscapes.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5E0A736A224CFC2300DCD41D /* HTMLEscapes.plist */; };
5E441EB81E525FCA0041CF34 /* HTMLString.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* HTMLString.swift */; };
5E441EB91E525FCA0041CF34 /* Mappings.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* Mappings.swift */; };
5E441EE21E5260980041CF34 /* HTMLString.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* HTMLString.swift */; };
@@ -60,7 +56,6 @@

/* Begin PBXFileReference section */
55BFFFD61F59574E00F13633 /* TestData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestData.swift; path = HTMLStringTests/TestData.swift; sourceTree = "<group>"; };
5E0A736A224CFC2300DCD41D /* HTMLEscapes.plist */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = HTMLEscapes.plist; sourceTree = "<group>"; };
5E441EA91E525F2D0041CF34 /* HTMLString.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = HTMLString.plist; path = Configs/HTMLString.plist; sourceTree = "<group>"; };
5E441EAA1E525F340041CF34 /* HTMLStringTests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = HTMLStringTests.plist; path = Configs/HTMLStringTests.plist; sourceTree = "<group>"; };
5E441EB01E525FB70041CF34 /* HTMLString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HTMLString.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -133,14 +128,6 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5E0A7369224CFC2300DCD41D /* Resources */ = {
isa = PBXGroup;
children = (
5E0A736A224CFC2300DCD41D /* HTMLEscapes.plist */,
);
path = Resources;
sourceTree = "<group>";
};
5E441EA61E525EFC0041CF34 /* Configs */ = {
isa = PBXGroup;
children = (
@@ -193,7 +180,6 @@
isa = PBXGroup;
children = (
OBJ_6 /* Package.swift */,
5E0A7369224CFC2300DCD41D /* Resources */,
OBJ_7 /* Sources */,
OBJ_12 /* Tests */,
5E441EA61E525EFC0041CF34 /* Configs */,
@@ -446,31 +432,27 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E0A736B224CFC2300DCD41D /* HTMLEscapes.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5E441EBE1E525FE50041CF34 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E0A736E224CFC2300DCD41D /* HTMLEscapes.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5E441ECB1E5260280041CF34 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E0A736D224CFC2300DCD41D /* HTMLEscapes.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5E441ED81E52604A0041CF34 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E0A736C224CFC2300DCD41D /* HTMLEscapes.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2017 Alexis Aubry Radanovic <me@alexaubry.fr>
Copyright (c) 2016-present Alexis Aubry <me@alexaubry.fr>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1,7 +1,7 @@
<p align="center">
<img src="https://github.com/alexaubry/HTMLString/raw/swift4/.github/logo.png" alt="HTMLString" />
<a>
<img src="https://img.shields.io/badge/Swift-4.0-ee4f37.svg" alt="Swift 4.0" />
<img src="https://img.shields.io/badge/Swift-5.0-ee4f37.svg" alt="Swift 5.0" />
</a>
<a href="https://travis-ci.org/alexaubry/HTMLString">
<img src="https://travis-ci.org/alexaubry/HTMLString.svg?branch=swift4" alt="Build Status" />
@@ -40,43 +40,30 @@
## Installation
### HTMLString version vs Swift version
Below is a table that shows which version of HTMLString you should use for your Swift version.
| Swift version | HTMLString Version |
|---------------|--------------------|
| 4.X | >= 4.0.0 |
| 3.X | >= 3.0.0 |
### Swift Package Manager
Add this line to your `Package.swift` :
~~~swift
.Package(url: "https://github.com/alexaubry/HTMLString", majorVersion: 4, minor: 0)
.Package(url: "https://github.com/alexaubry/HTMLString", majorVersion: 5, minor: 0)
~~~
### CocoaPods
Add this line to your `Podfile`:
~~~ruby
pod 'HTMLString', '~> 4.0'
pod 'HTMLString', '~> 5.0'
~~~
### Carthage
Add this line to your Cartfile:
~~~
github "alexaubry/HTMLString" ~> 4.0
github "alexaubry/HTMLString" ~> 5.0
~~~
### Manual
Copy the `Sources/HTMLString/` directory into your project.
## Usage
`HTMLString` allows you to add and remove HTML entities from a String.
@@ -166,9 +153,3 @@ NSString *snack = [escapedSnack stringByRemovingHTMLEntities]; // "Fish & Chips"
## License
HTMLString is available under the MIT license. See the [LICENSE](LICENSE) file for more info.
## &#128175; Acknowledgements
![Thanks @google](https://i.giphy.com/QBC5foQmcOkdq.gif)
This library was originally inspired by [**@google**'s Toolbox for Mac](https://github.com/google/google-toolbox-for-mac).

Large diffs are not rendered by default.

0 comments on commit b6f8238

Please sign in to comment.
You can’t perform that action at this time.