[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/racket-mode a745a92579 3/3: Ignore new <span class="button
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/racket-mode a745a92579 3/3: Ignore new <span class="button-group"> elements |
|
Date: |
Wed, 15 Nov 2023 10:00:20 -0500 (EST) |
branch: elpa/racket-mode
commit a745a92579ff65d2941a1226383a80a00b0c490c
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>
Ignore new <span class="button-group"> elements
These use "link" and "i" emoticons that...
(a) render as \nnn byte strings, because we're using
insert-file-contents-literally, and I don't have time now to figure
out why we use that instead of insert-file-contents, and how to use
the latter for encoding while avoiding whatever other behavior we
wanted to avoid.
(b) in a browser only show when the user hovers with the mouse, but in
our case would appear always, after every main section heading, which
is nosiy.
Someday/maybe we should figure out a way to present the hidden
information -- a "link here" URL, as well as the scribble source doc
URL on GitHub -- that's appropriate for our UX. And then deal with the
various ways this has been presented in Scribble HTML over time.
---
racket-scribble.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/racket-scribble.el b/racket-scribble.el
index 363af6c68e..5bce1a6b34 100644
--- a/racket-scribble.el
+++ b/racket-scribble.el
@@ -165,12 +165,18 @@ In some cases we resort to returning custom elements for
(`(a ((name . ,name)) . ,xs)
`(racket-anchor ((name . ,name)) . ,xs))
+ ;; Ignore new <span class="button-group"> elements.
+ (`(span ((class . "button-group")) . ,_)
+ `(span))
+
;; Replace <a> with <racket-doc-link> or <racket-ext-link>. The
;; former are links to follow using racket-describe-mode, the
;; latter using browse-url (a general-purpose, probably external
;; web browser).
(`(a ,_ . ,xs)
(pcase (dom-attr dom 'href)
+ ;; No href.
+ (`() `(span () ,@(mapcar #'racket--walk-dom xs)))
;; Handle "local-redirect" links. Scribble writes these as
;; external links, and generates doc/local-redirect.js to
;; adjust these on page load. Partially mimic that js here.