Skip to content

Commit 7977aff

Browse files
committed
improve documentation
1 parent 40f83b3 commit 7977aff

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

Pod/Classes/HTMLEntityMapping.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
import Foundation
99

10-
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244
11-
// 99.99% Credit to Martin R!
12-
// Mapping from XML/HTML character entity reference to character
13-
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
10+
/**
11+
Mapping from XML/HTML character entity reference to character
12+
From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
13+
*/
1414
public let characterEntities : [String: Character] = [
1515
// XML predefined entities:
1616
""" : "\"",

Pod/Classes/StringExtensionHTML.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import Foundation
22

3+
/// A string extension which provides easy functionality to decode
4+
/// HTML entities.
35
extension String {
46

7+
/// Returns a new string made by removing in the `String`
8+
/// anything enclosed in HTML brackets <>
59
public var stringByStrippingHTMLTags: String {
610
return stringByReplacingOccurrencesOfString("<[^>]+>", withString: "", options: .RegularExpressionSearch, range: nil);
711
}

StringExtensionHTML.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = "StringExtensionHTML"
11-
s.version = "0.1.2"
11+
s.version = "0.1.3"
1212
s.summary = "Extends the native Swift string with a method to easily decode HTML entities."
1313

1414
# This description is used to generate tags and improve search results.

0 commit comments

Comments
 (0)