diff options
author | Sean Allred <code@seanallred.com> | 2014-11-18 21:53:44 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2014-11-18 21:53:44 -0500 |
commit | 2d44aaa67c3d462debd35ce7b814f4d78e08fe29 (patch) | |
tree | 81618f3bd6b9d949c9b95a5952492171228d1af5 /sx-encoding.el | |
parent | 9df98091a366a3b1585ba52a21b0261b314ea8bd (diff) |
Documentation -- part two
Pushing this change to continue work elsewhere.
Diffstat (limited to 'sx-encoding.el')
-rw-r--r-- | sx-encoding.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sx-encoding.el b/sx-encoding.el index 91d2765..8af020e 100644 --- a/sx-encoding.el +++ b/sx-encoding.el @@ -60,7 +60,9 @@ ucirc "û" Ucirc "Û" ugrave "ù" Ugrave "Ù" uml "¨" upsih "ϒ" Upsilon "Υ" upsilon "υ" uuml "ü" Uuml "Ü" weierp "℘" Xi "Ξ" xi "ξ" yacute "ý" Yacute "Ý" yen "¥" yuml "ÿ" Yuml "Ÿ" Zeta "Ζ" zeta "ζ" zwj "" zwnj "") - "Plist of HTML entities and their respective glyphs." + "Plist of HTML entities and their respective glyphs. + +See `sx-encoding-decode-entities'." :type '(repeat (choice symbol string)) :group 'sx) @@ -72,9 +74,6 @@ list does not contain the entity, it is assumed to be a number and converted to a string (with `char-to-string'). Return the decoded string." - ;; @TODO Why are we limiting ourselves to two digits, here? - ;; "Ɛ" is perfectly valid, corresponding to "Ɛ". (Note that - ;; "Ɛ" is not in our plist.) (let* ((plist sx-encoding-html-entities-plist) (get-function (lambda (s) @@ -84,6 +83,7 @@ Return the decoded string." ;; Handle things like ' (char-to-string (string-to-number + ;; Skip the `#' (substring ss 1)))))))) (replace-regexp-in-string "&[^; ]*;" get-function string))) @@ -92,8 +92,8 @@ Return the decoded string." The API returns strings that use Windows-style line endings. These are largely useless in an Emacs environment. Windows uses -\"\\r\\n\", Unix uses just \"\\n\". Deleting \"\\r\" is -sufficient for conversion." +\"\\r\\n\", Unix uses just \"\\n\". Deleting \"\\r\" is sufficient for +conversion." (delete ?\r string)) (defun sx-encoding-clean-content (string) |