This ensures the UUID is placed before the _filename_ part and not
before the _subdir_ part if the title of the new file is specified as
`subdir/myfile`
* fix(tags): fix rg command if PCRE not available (closes#145)
Some linux distro do not compile ripgrep using the --pcre2 flag.
This commit checks if the --pcre2 flag is available and then tweaks the
ripgrep command accordingly.
At the moment, it will therefore not be possible to filter-out
hexademical color codes from #tags for people that do not have the
--pcre2 flag available. This will be documented in a later commit.
**Important**: the detection of the PCRE availability is done by trying
a simple rg search using _os.execute_. This function interface was
changed in Lua 5.2, which means it will break when Neovim will update to
Lua >5.1. The fix is already there in commented form.
Fixes#145
* refact: cleanup
* doc(tag): add note about rg --pcre2
* doc(tag): add note about rg --pcre2 in vim help
Provide the user with the choice between:
"title" (default) - Title only
"uuid" - UUID only
"uuid-title" - Title prefixed by UUID
"title-uuid" - Title suffixed with UUID
We were previously only returning a uuid if the user wanted to include
them in their filenames, which meant that they couldn't be included in
the template itself.
* Allow media picker to yank relative image links
* Make stylua happy
* Fix for image paste as well
* Try to get more consistent relative path behavior
* Supply absolute paths to make_relative_path
* Add relative link handling for InsertImgLink
* fix: note title ending removed when it matches parts of extension
By using [] we provide a character set rather than a direct match with ().
Lua patterns don't allow N-captures with (), so we continue executing
the pattern until there are no more substitutions being executed.
fixes#118
* fix: refactor extension stripping from title
Don't worry about n-capture, once is enough.
Turned it into a fn so it can be used elsewhere.
refs #118