<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -595,9 +595,13 @@ public class MarkdownProcessor {
         String linkId;
         int k = j;
         j += 1;
-        /* if (j &lt; length &amp;&amp; isSpace(chars[j])) {
+        // this is weird, bug we follow the official markup implementation here:
+        // only accept space between link text and link target for [][], not for []()
+        boolean extraSpace = false;
+        if (j &lt; length &amp;&amp; isSpace(chars[j])) {
             j += 1;
-        } */
+            extraSpace = true;
+        }
         c = chars[j++];
         if (c == '[') {
             while (j &lt; length &amp;&amp; chars[j] != ']') {
@@ -620,7 +624,7 @@ public class MarkdownProcessor {
                     return false;
                 }
             }
-        } else if (c == '(') {
+        } else if (c == '(' &amp;&amp; !extraSpace) {
             link = new String[2];
             while (j &lt; length &amp;&amp; chars[j] != ')' &amp;&amp; !isSpace(chars[j])) {
                 if (chars[j] == '\n') {</diff>
      <filename>src/org/helma/util/MarkdownProcessor.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>26a499e927923956aa235d6bd580ea5ebaea9c49</id>
    </parent>
  </parents>
  <author>
    <name>Hannes Wallnoefer</name>
    <email>hannes@helma.at</email>
  </author>
  <url>http://github.com/hns/helma-ng/commit/65a4300f38d27b9d59a810156998368a9bf38f23</url>
  <id>65a4300f38d27b9d59a810156998368a9bf38f23</id>
  <committed-date>2009-05-16T12:45:48-07:00</committed-date>
  <authored-date>2009-05-16T12:45:48-07:00</authored-date>
  <message>Follow quirks of official markdown implementation: Allow one space character between [linktext] [target], but not in [linktext](http://target)

git-svn-id: https://dev.helma.org/svn/helma-ng/trunk@9798 688a9155-6ab5-4160-a077-9df41f55a9e9</message>
  <tree>8208465ac7bf5b2b1b2f63e8552381e282dc8c62</tree>
  <committer>
    <name>Hannes Wallnoefer</name>
    <email>hannes@helma.at</email>
  </committer>
</commit>
