Skip to content

mldoc's astExportMarkdown loses property information #112

@cldwalker

Description

@cldwalker

Hi @tiensonqin. When I use Mldoc's astExportMarkdown from js (via nbb), I noticed that blocks with only one property do not export their property drawer. Blocks with 2 or more properties export their property drawer fine. I think this is a bug as export should not lose property information. To reproduce, you can use the logseq-roundtrip script which converts markdown file to ast and then exports ast to markdown file. Steps to reproduce

  • git clone https://github.com/cldwalker/nbb-clis && cd nbb-clis
  • curl https://raw.githubusercontent.com/cldwalker/nbb-clis/main/test/resources/advanced.md -o advanced.md
  • bin/logseq-roundtrip advanced.md advanced-roundtrip.md
  • Observe that the fig node doesn't export collapsed:: true while the banana node exports its properties

I suspect 9aed290#r63959759 is the source of the bug but I don't know ocaml

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions