mldoc's astExportMarkdown loses backslash
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 281
- Forks
- 30
- Avg merge
- 5h 30m
- Merged PRs (30d)
- 4
Description
Following up to #112, when I use Mldoc's astExportMarkdown from js (via nbb), I observe that backslashes are removed from the resulting export. Steps to reproduce:
```sh
# Build latest mldoc
$ cd /your/local/mldoc
$ make
$ cp _build/default/js/lib.bc.js js/package/index.js
$ git clone https://github.com/cldwalker/nbb-clis && cd nbb-clis
# Install local mldoc until a new one is published
$ cd clis/mldoc
$ npm i /your/local/mldoc/js/package
$ cd -
# Roundtrip example failure
$ echo "- example postgres cmd: \dt" > basic.md
$ logseq-roundtrip basic.md basic2.md
$ diff bas*
1c1
< - example postgres cmd: \dt
---
> - example postgres cmd: dt
```
You can see that the resulting export removes the backslash. However, it seems backslashes aren't removed if there is whitespace after the backslash.
For example, `- alias apm='/Applications/Atom\ Beta.app/Contents/Resources/app/apm/bin/apm'` exports the same
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the listed mldoc build and nbb roundtrip reproduction, then inspect the astExportMarkdown entry point and the generated js/package/index.js boundary. Done when a backslash in input such as `\dt` is preserved in the Markdown export and the reproduction diff no longer shows it removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, ocaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100