]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Tables containing links with a link text were misparsed, because the "|"
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 28 Aug 2007 23:06:24 +0000 (23:06 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 28 Aug 2007 23:06:24 +0000 (23:06 +0000)
  in the wikilink looked like a table field separator. Avoid this ambiguity
  by linkifying the data before parsing it as a table.
* Turn on allow_loose_quotes in the table plugin's Text::CSV object,
  so that links from wikilinks don't confuse the parser.

IkiWiki/Plugin/table.pm
debian/changelog
doc/bugs/wikilink_in_table.mdwn
po/ikiwiki.pot

index 698f9c9b61501034736e82d2c1deac3167670072..c7b6640525d6b88f4d6b58ac70164d222bbf8038 100644 (file)
@@ -22,6 +22,10 @@ sub preprocess (@) { #{{{
                }
                $params{data} = readfile(srcfile($params{file}));
        }
                }
                $params{data} = readfile(srcfile($params{file}));
        }
+       else {
+               $params{data} = IkiWiki::linkify($params{page},
+                       $params{destpage}, $params{data});
+       }
 
        if (lc $params{format} eq 'auto') {
                # first try the more simple format
 
        if (lc $params{format} eq 'auto') {
                # first try the more simple format
@@ -92,6 +96,7 @@ sub split_csv ($$) { #{{{
        my $csv = Text::CSV->new({ 
                sep_char        => defined $delimiter ? $delimiter : ",",
                binary          => 1,
        my $csv = Text::CSV->new({ 
                sep_char        => defined $delimiter ? $delimiter : ",",
                binary          => 1,
+               allow_loose_quotes => 1,
        }) || error("could not create a Text::CSV object");
        
        my $l=0;
        }) || error("could not create a Text::CSV object");
        
        my $l=0;
index edb019c0c3eea632cdc8ba69bc9385bca730e2ac..99893bc102853faf4b438b30ef0ba569e01e65f8 100644 (file)
@@ -10,8 +10,13 @@ ikiwiki (2.7) UNRELEASED; urgency=low
     wrapper.
   * Fix some taint issues with generating wrappers using the command line.
   * Don't allow newlines in link text in a wikilink.
     wrapper.
   * Fix some taint issues with generating wrappers using the command line.
   * Don't allow newlines in link text in a wikilink.
+  * Tables containing links with a link text were misparsed, because the "|"
+    in the wikilink looked like a table field separator. Avoid this ambiguity
+    by linkifying the data before parsing it as a table.
+  * Turn on allow_loose_quotes in the table plugin's Text::CSV object,
+    so that links from wikilinks don't confuse the parser.
 
 
- -- Joey Hess <joeyh@debian.org>  Tue, 28 Aug 2007 18:54:06 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue, 28 Aug 2007 19:03:34 -0400
 
 ikiwiki (2.6.1) unstable; urgency=low
 
 
 ikiwiki (2.6.1) unstable; urgency=low
 
index fe9bc6da29f8bb91f089b1f534dfdf9ea298487b..e6cb213fab53f10a72e0c579fa4e30d82e6dfa3f 100644 (file)
@@ -1,24 +1,32 @@
 I try to create wikilink in table. But it does not work. Here is example:
 
 I try to create wikilink in table. But it does not work. Here is example:
 
-     ||table class=table1 data="""
-     ||wikilink_test|servers/webmail1]]
-     ||wikilink_test\|servers/webmail1]]
-     [wikilink test](/servers/webmail1)
-     """]]
+[[table class=table1 data="""
+[[wikilink_test|index]]
+[[wikilink_test\|index]]
+[wikilink test](/servers/webmail1)
+"""]]
 
 First two wikilink entries do not work.
 
 The last one is url link and it works but it is not a wikilink. Or maybe it does not matter if I use URL links in stead of wikilinks for local wiki content?
 
 
 First two wikilink entries do not work.
 
 The last one is url link and it works but it is not a wikilink. Or maybe it does not matter if I use URL links in stead of wikilinks for local wiki content?
 
+> [[fixed|done]] --[[Joey]]
+
 What exactly is a difference between wikilink and URL reference to the same page ?
 
 What exactly is a difference between wikilink and URL reference to the same page ?
 
+> ikiwiki will not be able to track pages linked using urls as having a
+> link.
+
 Trying to report this I found something weird. I changed in the example [[ with || because wiki renders something wrongly. You can see what I tried originally here:
 
 Trying to report this I found something weird. I changed in the example [[ with || because wiki renders something wrongly. You can see what I tried originally here:
 
-     [[table class=table1 data="""
-     [[wikilink_test|servers/webmail1]]
-     [[wikilink_test\|servers/webmail1]]
-     [wikilink test](/servers/webmail1)
-     """]]
+       \[[table class=table1 data="""
+       [[wikilink_test|servers/webmail1]]
+       [[wikilink_test|servers/webmail1]]
+       [wikilink test](/servers/webmail1)
+       """]]
 
 Please click edit to see unrendered text. First, it is not monospace-d (I have 4 spaces) and second, some wierd html is shown...
 Am I doing something wrong ?
 
 Please click edit to see unrendered text. First, it is not monospace-d (I have 4 spaces) and second, some wierd html is shown...
 Am I doing something wrong ?
+
+> See above for the right way to do it. Note that I also fixed a minor bug
+> in ikiwiki that makes it not display the opening `[[` above. --[[Joey]]
index e262569f2da5fae2af4e32db1b63487af3746607..8fc1dd38f7ea5e03bcb98f7a627e5002a46834b5 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-08-27 21:24-0400\n"
+"POT-Creation-Date: 2007-08-28 18:22-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -589,7 +589,7 @@ msgstr ""
 msgid "usage: ikiwiki [options] source dest"
 msgstr ""
 
 msgid "usage: ikiwiki [options] source dest"
 msgstr ""
 
-#: ../ikiwiki.in:81
+#: ../ikiwiki.in:83
 msgid "usage: --set var=value"
 msgstr ""
 
 msgid "usage: --set var=value"
 msgstr ""