feat: add Html type - #14935
feat: add Html type#14935Vtec234 wants to merge 9 commits into
Conversation
|
Reference manual CI status:
|
|
Mathlib CI status (docs):
|
|
The adaptation PR for this PR is leanprover/downstream-lean4#25. |
|
|
||
| namespace Lean | ||
|
|
||
| /-- A forest of HTML trees. |
There was a problem hiding this comment.
| /-- A forest of HTML trees. | |
| /-- | |
| A forest of HTML trees. |
There was a problem hiding this comment.
I would also expand this a little bit, because "forest of trees" may not be immediately obvious.
What about something like:
HTML content, which may be either a single node or a sequence of sibling nodes.
There was a problem hiding this comment.
Changed wording. To clarify - why does the newline matter?
| This type is optimized for convenient authoring of HTML documents. | ||
| It is not formally related to | ||
| the [HTML DOM representation](https://html.spec.whatwg.org/dev/dom.html). | ||
| It is analogous to React's [Fragment](https://react.dev/reference/react/Fragment). -/ |
There was a problem hiding this comment.
| It is analogous to React's [Fragment](https://react.dev/reference/react/Fragment). -/ | |
| It is analogous to React's [Fragment](https://react.dev/reference/react/Fragment). | |
| -/ |
How stable is that link? We don't yet have a link checker as part of Lean CI for external links.
There was a problem hiding this comment.
It has existed since 2023. React have moved their docs across domains once already, although the old link from 2018 (https://reactjs.org/docs/fragments.html) continues to work.
This PR adds a type
Lean.Data.Htmlof HTML forests — aimed primarily at authoring HTML (as opposed to internal representation in a web server, etc) — as well as a renderer that produces aStringobject.Rendering directly into
FS.Streamis out of scope for this PR.Downstream adoption (not merely adaptation to make CI pass) PRs that use the new type and renderer: