Closed artur-shaik closed 1 year ago
Sadly, this patch have a few bugs:
This kills previously worked function with selecting multiple lines (when first line becomes a title, and all trailing becomes a description). The problem is in parent note, where should be placed our new link.
Example:
example title
description
Visual select this two lines, make ZkNewFromTitleSelection
and see messed result:
[example title](usi2)description
This messes whole line (even if selected only part of it) if you do visual select till the latest symbol on the line
Example:
* asd my future title
^ cursor is there
Type v$
and make ZkNewFromTitleSelection
. Result:
[my future title](b7ku)my future title
(Also see how heading text ("* asd ") disappeared)
To avoid messing we can visual select with v$h
(just jump to one symbol left), so I think problem is with newline character.
P.S. before this commit v$
also worked without messing
@mickael-menu @artur-shaik Should I create issue for this or will you revert commit and continue work on this pull req?
Thanks for spotting this @UnkwUsr. I will revert the PR for now, feel free to open a new PR to implement a fixed version @artur-shaik.
I made a conversion bytes based indexes of character position to char based before execute
zk.new
command. So now I can successfully extract titles from Cyrillic encoded text.