nvim-neorg / neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
GNU General Public License v3.0
6.5k stars 214 forks source link

`core.summary` failed to generate correct path if the workspace contain a `-` character #1071

Open amalgame21 opened 1 year ago

amalgame21 commented 1 year ago

Prerequisites

Neovim Version

NVIM v0.9.1

Neorg setup

require('neorg').setup {
    load = {
    ["core.summary"] = {},
        ["core.defaults"] = {},
        ["core.dirman"] = {
            config = {
                workspaces = {
                    work = "~/notes/w-ork",
                }
            }
        }
    }
}

Notice the - in the path of workspace.

Actual behavior

Use :Neorg generate-workspace-summary to generate a summary after adding a new note named "Hello". The corresponding output become: - {:$/home/user/notes/w-ork/Hello:}[Hello]

Which redirected me to a file with path ~/notes/w-ork/home/user/notes/w-ork/Hello.norg

Expected behavior

The correct corresponding output should be: - {:$/Hello:}[Hello]

Steps to reproduce

As described in the Actual behavior section.

Potentially conflicting plugins

No response

Other information

Maybe related to #1012

Help

None

Implementation help

No response

vhyrro commented 1 year ago

Right I would assume there's an issue somewhere with lua patterns which are mistreating the - character. I'll let you know if and when I fix it :)

amalgame21 commented 1 year ago

Thanks! Take your time! Btw I just discovered this plugin few days ago, this is really interesting! Can't wait for the 6th tutorial on youtube :D

Anthony-E-B commented 8 months ago

Cannot reproduce on Linux nor Windows with nvim 0.9.1 and latest version of neorg.