[Tkabber-dev] r557 - branches/plugins-0.11.1/juick

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Apr 27 20:34:23 MSK 2014


Author: Totktonada
Date: 2014-04-27 20:34:23 +0400 (Sun, 27 Apr 2014)
New Revision: 557

Modified:
   branches/plugins-0.11.1/juick/juick.tcl
Log:
Juick plugin (tkabber-0.11.1 branch):

* Add undocumented [title](URL) link style.


Modified: branches/plugins-0.11.1/juick/juick.tcl
===================================================================
--- branches/plugins-0.11.1/juick/juick.tcl	2014-04-27 16:33:47 UTC (rev 556)
+++ branches/plugins-0.11.1/juick/juick.tcl	2014-04-27 16:34:23 UTC (rev 557)
@@ -722,10 +722,18 @@
 proc spot_markdown_url {what at startVar endVar} {
     variable ::plugins::urls::url_regexp
 
+    # [title][URL]
     set matched [regexp -indices -start $at -- \
         {(\[([^\]]+)\]\[([^\]]+)\])} $what -> \
         bounds title_bounds url_bounds]
 
+    if {!$matched} {
+        # [title](URL)
+        set matched [regexp -indices -start $at -- \
+            {(\[([^\]]+)\]\(([^\)]+)\))} $what -> \
+            bounds title_bounds url_bounds]
+    }
+
     if {!$matched} { return false }
 
     lassign $url_bounds us ue



More information about the Tkabber-dev mailing list