diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-28 23:06:24 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-28 23:06:24 +0000 |
commit | 4142c02f738ac119086509aa979ead5146b32a52 (patch) | |
tree | 310f6f667065b26b93fa84bcde0cd0ed7016f2f6 | |
parent | 25294defb814e6d4a53848c89a86e982bda1fc30 (diff) | |
download | ikiwiki-4142c02f738ac119086509aa979ead5146b32a52.tar ikiwiki-4142c02f738ac119086509aa979ead5146b32a52.tar.gz |
* 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.
-rw-r--r-- | IkiWiki/Plugin/table.pm | 5 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | doc/bugs/wikilink_in_table.mdwn | 28 | ||||
-rw-r--r-- | po/ikiwiki.pot | 4 |
4 files changed, 31 insertions, 13 deletions
diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm index 698f9c9b6..c7b664052 100644 --- a/IkiWiki/Plugin/table.pm +++ b/IkiWiki/Plugin/table.pm @@ -22,6 +22,10 @@ sub preprocess (@) { #{{{ } $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 @@ -92,6 +96,7 @@ sub split_csv ($$) { #{{{ 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; diff --git a/debian/changelog b/debian/changelog index edb019c0c..99893bc10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. + * 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 diff --git a/doc/bugs/wikilink_in_table.mdwn b/doc/bugs/wikilink_in_table.mdwn index fe9bc6da2..e6cb213fa 100644 --- a/doc/bugs/wikilink_in_table.mdwn +++ b/doc/bugs/wikilink_in_table.mdwn @@ -1,24 +1,32 @@ 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? +> [[fixed|done]] --[[Joey]] + 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: - [[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 ? + +> 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]] diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index e262569f2..8fc1dd38f 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" 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" @@ -589,7 +589,7 @@ msgstr "" msgid "usage: ikiwiki [options] source dest" msgstr "" -#: ../ikiwiki.in:81 +#: ../ikiwiki.in:83 msgid "usage: --set var=value" msgstr "" |