Skip to content

mldoc's astExportMarkdown loses backslash #116

@cldwalker

Description

@cldwalker

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:

# 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

Metadata

Metadata

Assignees

No one assigned

    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