From c7ab46f20fa5a7ac219dc6368daeccf381cd47f6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 8 Apr 2020 15:06:12 +0200 Subject: Link in case of comma at end of URL When having a text like: ``` https://storm-irit.github.io/OpenGR/, 2017. ``` the corresponding link will contain the comma as well although this is not intended. The original problem comes from CGAL, where we have a bibliography entry: ``` @misc{ cgal:m-ogr-17, author = {Nicolas Mellado and others}, title = {OpenGR: A C++ library for 3D Global Registration}, howpublished = {https://storm-irit.github.io/OpenGR/}, year = {2017} } ``` --- src/doctokenizer.l | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index cfabd31..6a5ed3a 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -637,6 +637,11 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} } return TK_COMMAND_SEL(); } +{URLPROTOCOL}{URLMASK}/, { // URL, + g_token->name=yytext; + g_token->isEMailAddr=FALSE; + return TK_URL; + } {URLPROTOCOL}{URLMASK}/\. { // URL. g_token->name=yytext; g_token->isEMailAddr=FALSE; -- cgit v0.12