From: Lady Date: Thu, 18 Jan 2024 01:55:19 +0000 (-0500) Subject: Add @书社:parsed-by to parse results X-Git-Tag: 0.4.0~3 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/90810b4c234960e725e770f331b13c4687f407c8?ds=inline;hp=90810b4c234960e725e770f331b13c4687f407c8 Add @书社:parsed-by to parse results This switches the parser to use a two‐stage parse, in which each node is by default first processed in the `书社:parse` mode, which then applies templates to the node. This provides a hook for selecting certain kinds of elements, for example `` elements, and doing something to the result. The “something” in this case is “making note of the parser which is registered to that type on each result element by setting the `@书社:parsed-by` attribute to its `@id`. This setup also allows a reparsing of the parse result (in case new `` elements were produced by it); it is worth noting that this could result in an endless loop if the `` element is not actually transformed by any parser. ---