publish-spa icon indicating copy to clipboard operation
publish-spa copied to clipboard

Fail to export when page name contains emoji

Open Sansui233 opened this issue 1 year ago • 2 comments

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

Sansui233 avatar Jul 23 '24 22:07 Sansui233

I have a page with emoji working ::icon, where is it placing emoji?

http://notes.avelino.run/#/page/book%2Fthe%20amazon%20way

avelino avatar Jan 24 '25 01:01 avelino

I have a page with emoji working ::icon, where is it placing emoji?

http://notes.avelino.run/#/page/book%2Fthe%20amazon%20way

Hi! Yes, this is a temporary workaround. The issue is still a bug, as the current name parsing does not support emojis. I encountered this because my earliest journal entry is from about 3–4 years ago, back when the icon property wasn’t supported so I place emoji in the title.

Additionally, even with the icon property, emojis don’t always appear in link references. Sometimes, I use an icon to directly indicate the category in references, such as: [[📃Hybrid of Spans and Table-Filling for Aspect-Level Sentiment Triplet Extraction]].

Overall, the main reason I reported this is that file names should be parsed correctly, rather than relying on a user-side fallback that leaves the behavior as it is.

Sansui233 avatar Jan 24 '25 06:01 Sansui233