On 1/2/21 1:20 PM, Michael Vehrs wrote:
I am experimenting with a plain text engine. I defined a markup writer
for the paragraph element, adding an extra keyword. This shows up fine
in a paragraph element, but not in a "p" element. So I defined a
markup-writer for "p" explicitly, but it still doesn't work. Can someone
explain what is going on here?

Regards

Michael





As far as I can tell, this definition from package/base.scm means that p
will only ever call paragraph with the minimum arguments, making it
impossible to extend p:

(define-markup (p :rest opt :key ident (class #f))
   (paragraph :ident ident :class class :loc &invocation-location
      (the-body opt)))

I would consider this a bug. I think it would be better to define p in
the usual way, and to extend markup-writer to handle a list of markup
elements.


Regards

Michael


Reply via email to