Skip to content

Commit

Permalink
Handle ellipses and misc HTML entities; fixes #89
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Jul 7, 2024
1 parent 34ada74 commit f5c50b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion markdown/scrib.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
scribble/html-properties
scribble/manual
scribble/decode
(only-in scribble/core content?)
(only-in xml xexpr?))

(provide
Expand Down Expand Up @@ -75,7 +76,10 @@
[`(img ,(list-no-order `[src ,src] `[alt ,alt] `[title ,title]))
"image: TO-DO"] ;; Can Scribble inline an external image ??
[(? string? s) s]
[(? symbol? s) s]
[(? symbol? s)
(cond [(content? s) s] ;issue #89
[(eq? s 'hellip) "..."]
[else (format "~a" s)])]
;; TO-DO: Footnotes
[x (format "IGNORING ~v\n" x)])))

Expand All @@ -91,6 +95,7 @@
(chk '(h2 ([id "name"]) "h2") (subsection #:tag "name" (list "h2")))
(chk '(h3 ([id "name"]) "h3") (subsubsection #:tag "name" (list "h3")))
(chk '(p () "hi" "there") (para "hi" "there"))
(chk '(p () hellip) (para '("..."))) ;issue #89
(chk '(div
((class "figure"))
(img
Expand Down

0 comments on commit f5c50b9

Please sign in to comment.