Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

mldoc's astExportMarkdown loses backslash

Open
#116 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, ocaml
Domain
tooling

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.

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:

# 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

Dominant language
OCaml
Stars
281
Forks
30
Avg merge
5h 30m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from logseq/mldoc

All issues in logseq/mldoc

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.