Summary
The property/option-table cell styles round-trip to a markdown pipe table through a dedicated blockFor[..., BoxData[GridBox[...]]] := gridTable[rows] rule:
blockFor["2ColumnTableMod" | "3ColumnTableMod" | "TableNotes", BoxData[GridBox[rows_List, ___]]] := gridTable[rows]
A DefinitionBox cell holding the same kind of TableText grid (an option / property table, as a Tech Note carries) has no such rule, so it falls to the catch-all
blockFor[_String, c_] := tidy @ inlineMd[c]
and its GridBox is emitted through the generic inline path instead of gridTable — so it does not come back as a markdown table.
Repro (deterministic, kernel-only)
Get[".../NotebookToMarkdown.wl"];
NotebookToMarkdown @ Notebook[{
Cell[BoxData[GridBox[{{"Option", "Default"}, {"\"Method\"", "Automatic"}}]], "DefinitionBox"]
}]
Expected: a | Option | Default | markdown table (as a 2ColumnTableMod grid of the same content produces). Actual: no pipe table — the DefinitionBox GridBox is routed through inlineMd, not gridTable.
Root cause
NotebookToMarkdown.wl defines the BoxData[GridBox[...]] → gridTable rule only for the 2ColumnTableMod / 3ColumnTableMod / TableNotes styles. DefinitionBox is not among them, so it reaches blockFor[_String, c_] := tidy @ inlineMd[c].
Fix
Add the mirror rule so a DefinitionBox property/option grid recovers as a markdown table like the other *TableMod grids:
blockFor["DefinitionBox", BoxData[GridBox[rows_List, ___]]] := gridTable[rows]
Summary
The property/option-table cell styles round-trip to a markdown pipe table through a dedicated
blockFor[..., BoxData[GridBox[...]]] := gridTable[rows]rule:A
DefinitionBoxcell holding the same kind ofTableTextgrid (an option / property table, as a Tech Note carries) has no such rule, so it falls to the catch-alland its
GridBoxis emitted through the generic inline path instead ofgridTable— so it does not come back as a markdown table.Repro (deterministic, kernel-only)
Expected: a
| Option | Default |markdown table (as a2ColumnTableModgrid of the same content produces). Actual: no pipe table — theDefinitionBoxGridBoxis routed throughinlineMd, notgridTable.Root cause
NotebookToMarkdown.wldefines theBoxData[GridBox[...]]→gridTablerule only for the2ColumnTableMod/3ColumnTableMod/TableNotesstyles.DefinitionBoxis not among them, so it reachesblockFor[_String, c_] := tidy @ inlineMd[c].Fix
Add the mirror rule so a
DefinitionBoxproperty/option grid recovers as a markdown table like the other*TableModgrids: