Filter ansi codes from gopher menu items.
authorTim Vaughan <timv@ughan.xyz>
Thu, 12 Dec 2019 18:58:08 +0000 (19:58 +0100)
committerTim Vaughan <timv@ughan.xyz>
Thu, 12 Dec 2019 18:58:08 +0000 (19:58 +0100)
elpher.el

index 06c669e..474eee1 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -619,9 +619,10 @@ If ADDRESS is not supplied or nil the record is rendered as an
     (if type-map-entry
         (let* ((margin-code (elt type-map-entry 2))
                (face (elt type-map-entry 3))
     (if type-map-entry
         (let* ((margin-code (elt type-map-entry 2))
                (face (elt type-map-entry 3))
-               (page (elpher-make-page display-string address)))
+               (filtered-display-string (ansi-color-filter-apply display-string))
+               (page (elpher-make-page filtered-display-string address)))
           (elpher-insert-margin margin-code)
           (elpher-insert-margin margin-code)
-          (insert-text-button display-string
+          (insert-text-button filtered-display-string
                               'face face
                               'elpher-page page
                               'action #'elpher-click-link
                               'face face
                               'elpher-page page
                               'action #'elpher-click-link