aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-11-28 13:42:31 -0500
committerSean Allred <code@seanallred.com>2015-01-04 16:32:39 -0500
commit7335257fc2bf56e992e92801cf72926f15dc4807 (patch)
tree31a96c382464d09454c959e90808893e76c2ccd1
parent4b9ca544bcb498f5786f76186e99c638029b3161 (diff)
Add sections to `sx-encoding.el'
-rw-r--r--sx-encoding.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/sx-encoding.el b/sx-encoding.el
index cf7d0f8..dad8a53 100644
--- a/sx-encoding.el
+++ b/sx-encoding.el
@@ -28,6 +28,9 @@
(require 'cl-lib)
+
+;;;; HTML Encoding
+
(defcustom sx-encoding-html-entities-plist
'(Aacute "Á" aacute "á" Acirc "Â" acirc "â" acute "´" AElig "Æ" aelig "æ"
Agrave "À" agrave "à" alefsym "ℵ" Alpha "Α" alpha "α" amp "&" and "∧"
@@ -91,6 +94,9 @@ Return the decoded string."
(substring ss 1))))))))
(replace-regexp-in-string "&[^; ]*;" get-function string)))
+
+;;;; Convenience Functions
+
(defun sx-encoding-normalize-line-endings (string)
"Normalize the line endings for STRING.
The API returns strings that use Windows-style line endings.
@@ -136,6 +142,9 @@ some cases."
(cl-map #'vector #'sx-encoding-clean-content-deep data))
(t data))))
+
+;;;; GZIP
+
(defun sx-encoding-gzipped-p (data)
"Check for magic bytes in DATA.
Check if the first two bytes of a string in DATA match the magic