table: Fix misparsed links in external files

linkify data from external files at the same time as data from an inlined
table would be linkified.
master
Joey Hess 2009-01-06 15:05:09 -05:00
parent 26d3ba6146
commit da166e7422
3 changed files with 15 additions and 13 deletions

View File

@ -50,22 +50,18 @@ sub preprocess (@) {
defined $params{delimiter} ? $params{delimiter} : ",",);
# linkify after parsing since html link quoting can
# confuse CSV parsing
if (! exists $params{file}) {
@data=map {
[ map {
IkiWiki::linkify($params{page},
$params{destpage}, $_);
} @$_ ]
} @data;
}
@data=map {
[ map {
IkiWiki::linkify($params{page},
$params{destpage}, $_);
} @$_ ]
} @data;
}
elsif (lc $params{format} eq 'dsv') {
# linkify before parsing since wikilinks can contain the
# delimiter
if (! exists $params{file}) {
$params{data} = IkiWiki::linkify($params{page},
$params{destpage}, $params{data});
}
$params{data} = IkiWiki::linkify($params{page},
$params{destpage}, $params{data});
@data=split_dsv($params{data},
defined $params{delimiter} ? $params{delimiter} : "|",);
}

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
ikiwiki (3.02) UNRELEASED; urgency=low
* table: Fix misparsed links in external files.
-- Joey Hess <joeyh@debian.org> Tue, 06 Jan 2009 15:02:52 -0500
ikiwiki (3.01) unstable; urgency=low
* ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories.

View File

@ -17,7 +17,7 @@ Oh, wait, I see the problem. IkiWiki::linkify is only called if the external fil
>
> Why is linkify not called for external files? Well, I checked the
> history, and it's probably best to say "for historical reasons that no
> longer apply".
> longer apply". So, changed as you suggest. [[done]] --[[Joey]]
I am rather confused what this check does, and the fact the comments are very different for CSV and DSV when the code is the same doesn't seem to help.