feat(panettone): render a subset of markdown in issue subjects
This is achieved by implementing a simple markdown renderer in CL which has the following limitations: * Only supports inline `code`, *emphasize 1*, _emphasize 2_ and ~~strikethrough~~. * Does not support nested markup. This allows for a relatively simple renderer which doesn't need to parse markdown into a in-memory data structure first. The rendered result is directly written to a stream to integrate well with cl-who which is also reused for rendering tags and xml-escaping strings. Fixes #90. Change-Id: Ice88ed770b1fab6365f3b93e8663e25077befa0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2389 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
7e408c874a
commit
82e07fc046
6 changed files with 198 additions and 4 deletions
|
|
@ -7,6 +7,11 @@
|
|||
(:use :cl :lass)
|
||||
(:export :styles))
|
||||
|
||||
(defpackage panettone.inline-markdown
|
||||
(:use :cl)
|
||||
(:import-from :alexandria :define-constant)
|
||||
(:export :render-inline-markdown))
|
||||
|
||||
(defpackage panettone.irc
|
||||
(:use :cl :usocket)
|
||||
(:export :send-irc-notification))
|
||||
|
|
@ -42,7 +47,8 @@
|
|||
(defpackage panettone
|
||||
(:use :cl :klatre :easy-routes :iterate
|
||||
:panettone.util
|
||||
:panettone.authentication)
|
||||
:panettone.authentication
|
||||
:panettone.inline-markdown)
|
||||
(:import-from :defclass-std :defclass/std)
|
||||
(:import-from :alexandria :if-let :when-let :switch :alist-hash-table)
|
||||
(:import-from :cl-ppcre :split)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue