Conversation
hon-gyu
commented
Jul 7, 2026
Owner
- mlmdx: codegen (Doc -> Parsetree) + mlmdx-pp dialect preprocessor
- mlmdx: JSX breadth, prelude, merlin reader; restructure examples
- mlmdx: route structural markdown through overridable components table
- bump oymarkit
- mlmdx_codegen: Cmarkit.Doc.t -> Parsetree.structure exposing
`let make () = <element>`. Structural nodes emit plain JSX.node/string/list
calls; embedded {expr} spans are parsed by Parse.expression on a lexbuf primed
from the node's Textloc, so type errors land on the exact .mlmdx byte.
- mlmdx-pp: dialect preprocessor emitting the -pp binary AST protocol
(magic number + filename + structure).
Complete the .mlmdx -> HTML chain beyond the {expr} slice:
- codegen: inline/block host JSX, fragments, component calls, and a strict
top-of-file open/let/module prelude, alongside the existing {expr} lowering;
add codegen.mli.
- ocamlmerlin-mlmdx: merlin-extend reader over the shared codegen core, wired
via (merlin_reader mlmdx). Adds the merlin-extend dep.
- bump oymarkit to 2678a5a (native JSX expr/element nodes + block container).
- examples/: promote example/ to examples/hello/ with a README and a cram test
pinning the end-to-end rendered HTML.
- remove spike/: its composition proof is now subsumed by examples/ driving real
.mlx components through the full pipeline.
- README: self-contained rewrite (no external design doc).
Markdown-structural elements (headings, paragraphs, emphasis, code,blockquote) now lower to `components.h1 ~children:[…]` calls dispatchedthrough a `?components` parameter on the generated `make`, rather thanhardcoded `JSX.node`. This is what makes mlmdx MDX rather than plainmarkdown-to-HTML: a consumer can restyle or swap any element page-wide.- runtime/ (new `mlmdx` library): `Mlmdx.Components.t`, the record of per-element renderers, plus `default` whose renderers reproduce the vanilla HTML nodes — so an un-themed page is byte-for-byte identical to before. Literal JSX and `<Component/>` calls stay author intent and do not route through the table.- codegen: `md_elt` emits the table field access; `make` gains `?(components : Mlmdx.Components.t = Mlmdx.Components.default)`. The type annotation lets the field accesses disambiguate without an `open`. Expect tests updated to the new parsetree.- example/hello: render.ml now renders twice — default, then with an overridden `h1` — and render.t pins both lines.- README/docs: components table moved from "not yet done" to done; the SSG page-discovery driver is now the remaining open track.- TODO markers on the `_ -> jnull` catch-alls: unhandled inline/block constructs (links, images, lists, code blocks) still drop silently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.