logseq / logseq/publish-spa

Fail to export when page name contains emoji

Open
#36 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
313
Forks
29
PR merge metrics
No merged PRs in 30d

Description

What Happened?

Fail to export graph when page name contains emoji

Reproduce the Bug
  1. create a new graph
  2. run logseq-publish-spa out, success
  3. add a page titled 🔨test
  4. run logseq-publish-spa out , error
 Error: ENOENT: no such file or directory, open 'C:\Users\sansui\test\mygraph\pages\🔨test.md'
C:\Users\sansui\Developer\publish-spa\node_modules\mldoc\index.js:1031
throw b}function
^
el [Error]: ENOENT: no such file or directory, open 'C:\Users\sansui\test\mygraph\pages\🔨test.md'
    at new el (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:179:94)
    at $APP.Sm.j (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:1267:319)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:332:310
    at Jq (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:332:319)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:562:45
    at Q (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:308:469)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:421:113
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:561:498
    at Q (file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:308:469)
    at file:///C:/Users/sansui/Developer/publish-spa/node_modules/@logseq/nbb-logseq/lib/nbb_core.js:563:263 {
  data: {
    K: null,
    O: 6,
    H: [
...
Expected Behavior

No response

Desktop or Mobile Platform Information

Windows
Logseq v0.10.9

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.

Research direction

Start by reproducing the Windows failure with logseq-publish-spa out after creating a page titled 🔨test. Trace the export path into the file access reported at node_modules/mldoc/index.js:1031 and inspect the related nbb stack; done means the graph exports successfully when a page name contains emoji.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.