Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Markdown export links that contains #, ? etc #807

Closed
2 tasks done
pysan3 opened this issue Apr 19, 2023 · 0 comments · Fixed by #823
Closed
2 tasks done

bug: Markdown export links that contains #, ? etc #807

pysan3 opened this issue Apr 19, 2023 · 0 comments · Fixed by #823
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@pysan3
Copy link
Contributor

pysan3 commented Apr 19, 2023

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

0.9.0

Neorg setup

local M = {
  "nvim-neorg/neorg",
  ft = "norg",
  dependencies = {
    "nvim-treesitter/nvim-treesitter",
    "nvim-treesitter/nvim-treesitter-textobjects",
    "nvim-cmp",
  },
  build = ":Neorg sync-parsers",
  cmd = "Neorg",
  default_workspace = "Notes",
}

local function load_plugins()
  return {
    ["core.defaults"] = {},
    ["core.export"] = {},
    ...
  }
end

M.config = function()
  require("neorg").setup({
    load = load_plugins(),
  })
end

return M

Actual behavior

When you have a norg file like this, where there is a ? inside the link,

From No Org to Neorg - Workflow, Links | #2
- {https://www.youtube.com/watch?t=17m44s&v=Bi9JiW5nSig}

when you run :Neorg export to-file foo.md, the result will be,

From No Org to Neorg - Workflow, Links | #2
- [https://www.youtube.com/watch?t=17m44s&v=Bi9JiW5nSig](https://www.youtube.com/watch%3ft=17m44s&v=Bi9JiW5nSig)

where the ? is converted to %3f.

The same goes with # -> %23.

I know this is a result of URL encoding, but I believe these characters should remain the same and not be converted since they come up a lot in URLs.

Expected behavior

  • #, ? in links not encoded on export.

Steps to reproduce

From No Org to Neorg - Workflow, Links | #2
- {https://www.youtube.com/watch?t=17m44s&v=Bi9JiW5nSig}

Run command
:Neorg export to-file foo.md

Potentially conflicting plugins

No response

Other information

No response

Help

No

Implementation help

No response

@pysan3 pysan3 added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Apr 19, 2023
@vhyrro vhyrro closed this as completed in 7f3a3b8 Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant