← Back to team overview

zim-wiki team mailing list archive

Re: links in index

 

Thanks Jaap, I tried the git version and it works fine.

Happy new year and best wishes for 2021!

On Thu, 07 Jan 2021, Jaap Karssenberg wrote:
> Issue with "www." links is fixed in
> commit 515c62d04db10ca377324aad13fcf5aa8df9c891, will go in next release.
> 
> Thinking it through there is a bigger concern: pasting as text and then
> reloading can give unexpected results when the text contains wiki markup.
> Therefore I changed the default parsing of pasted text to wiki format.
> Pasting a link with wiki formatting as in the example of Raphael is fixed.
> (If you start typing "[[" and then paste the URI it still fails - in this
> case it is better to just hit ^L and paste the URI in the dialog.)
> 
> To still allow pasting plain text or e.g. code examples I added a "paste as
> verbatim" option in the context menu. To make things smooth paste will
> automatically do "paste as verbatim" when pasting in a verbatim text region.
> 
> These changes are in commit b7ea7b3d6ce572eb558b22a6dc0f4cef723da52f
> 
> Regards,
> 
> Jaap
> 
> 
> On Tue, Dec 15, 2020 at 11:30 AM Raphael Hertzog <hertzog@xxxxxxxxxx> wrote:
> 
> > On Tue, 15 Dec 2020, Jaap Karssenberg wrote:
> > > Found it - this is a regression when I made the URL parser more Markdown
> > /
> > > GitHub compliant (recognizing closing parenthesis etc.) based on
> > > https://github.github.com/gfm/#autolinks-extension-
> > >
> > > The parser now recognizes links starting with "www." as a special case
> > > without the "http://"; in front. However in a later parsing step these
> > are
> > > misqualified as page links.
> > >
> > > This can be fixed two ways (1) step recognizing "www." links unless they
> > > start with "http://"; or (2) make sure these links are properly
> > recognized
> > > as URL links instead of page links. For future compatibility with
> > Markdown
> > > I prefer solution (2).
> > >
> > > Any thoughts ?
> >
> > I was about to say that I'm fine with (2) but in fact I have another
> > somewhat related problem... consider this input:
> >
> > [[mid:CA+TmwMHj9wyWFWjS+JVP4506wPp4b693NSK88JO=+Y3F=JudeA@xxxxxxxxxxxxxx|Jaap
> > Karssenberg]]
> >
> > Up to now, I could paste this and after a CTRL+R I would have the desired
> > link. Now when I paste it, I get a link on the text "
> > mid:CA...@xxxxxxxxxxxxxx"
> > and the reload doesn't change anything, I still see the markup. I first
> > have to right click to remove the link before it will work.
> >
> > So I'm not sure that I like them very much unless you have some logic to
> > disable them:
> > - detect when you are in a manual link construct?
> > - maybe have a "Paste as wiki markup" ?
> >
> > Cheers,
> >
> > PS: Yes I have a special url handler for the "mid" prefix, launching my
> > email client on the linked email.
> > --
> >   ⢀⣴⠾⠻⢶⣦⠀   Raphaël Hertzog <hertzog@xxxxxxxxxx>
> >   ⣾⠁⢠⠒⠀⣿⡁
> >   ⢿⡄⠘⠷⠚⠋    The Debian Handbook: https://debian-handbook.info/get/
> >   ⠈⠳⣄⠀⠀⠀⠀   Debian Long Term Support: https://deb.li/LTS
> >

-- 
  ⢀⣴⠾⠻⢶⣦⠀   Raphaël Hertzog <hertzog@xxxxxxxxxx>
  ⣾⠁⢠⠒⠀⣿⡁
  ⢿⡄⠘⠷⠚⠋    The Debian Handbook: https://debian-handbook.info/get/
  ⠈⠳⣄⠀⠀⠀⠀   Debian Long Term Support: https://deb.li/LTS


References