From fb89bfd26bc248b8ce7c21446512b78b9ecb3391 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 7 Nov 2008 12:22:01 -0500 Subject: document wikistatedir, though it's still internal --- IkiWiki.pm | 9 ++++++++- po/ikiwiki.pot | 14 +++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index 91d2e6082..1aaa4d33c 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -403,6 +403,13 @@ sub getsetup () { #{{{ safe => 0, rebuild => 0, }, + wikistatedir => { + type => "internal", + default => undef, + description => "path to the .ikiwiki directory holding ikiwiki state", + safe => 0, + rebuild => 0, + }, setupfile => { type => "internal", default => undef, @@ -467,7 +474,7 @@ sub checkconfig () { #{{{ } $config{wikistatedir}="$config{srcdir}/.ikiwiki" - unless exists $config{wikistatedir}; + unless exists $config{wikistatedir} && defined $config{wikistatedir}; if (defined $config{umask}) { umask(possibly_foolish_untaint($config{umask})); diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 6894dd2f6..34fa5e65b 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: 2008-11-06 20:47-0500\n" +"POT-Creation-Date: 2008-11-07 12:23-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,7 +48,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1182 +#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1189 msgid "Error" msgstr "" @@ -951,25 +951,25 @@ msgstr "" msgid "refreshing wiki.." msgstr "" -#: ../IkiWiki.pm:466 +#: ../IkiWiki.pm:473 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:512 +#: ../IkiWiki.pm:519 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:541 +#: ../IkiWiki.pm:548 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1165 +#: ../IkiWiki.pm:1172 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1678 +#: ../IkiWiki.pm:1685 msgid "yes" msgstr "" -- cgit v1.2.3 From 4991cb441e6898a2d350c43c8618ce728331b9a4 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Sat, 8 Nov 2008 11:04:27 -0500 Subject: question about the format directive and relation with htmlize hooks --- doc/plugins/format/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/plugins/format/discussion.mdwn diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn new file mode 100644 index 000000000..b7d6ca71c --- /dev/null +++ b/doc/plugins/format/discussion.mdwn @@ -0,0 +1,5 @@ +Is there any way to tell if an htmlize hook have been called from a format directive? + +I am currently modifying the [[contrib/highlightcode]] plugin by [[sabr]] and I wanted to have a different behavior depending on the fact that the htmlize hook is called from a format directive or not. For instance, this could disable the raw copy of the highlighted code. Since I have enabled the keepextension option, I tried to rely on the page extension to decide whenever I have to create the raw file or not but this does not seems a reliable approach. + +One possible solution is to add an optional parameter to the htmlize hook (and thus to htmlize function in IkiWiki.pm) which could tell if this is the format directive that called the function but I am not sure that is a good way to do this. -- cgit v1.2.3 From e7d04199ec730deecc95b55679515bc5618526f8 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Sat, 8 Nov 2008 11:28:25 -0500 Subject: fix link to Jason Blevins user page --- doc/todo/syntax_highlighting.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn index 97526bae6..2bdeb62be 100644 --- a/doc/todo/syntax_highlighting.mdwn +++ b/doc/todo/syntax_highlighting.mdwn @@ -23,7 +23,7 @@ pages, as well as doing syntax highlighting as a preprocessor directive * [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]] also uses src-highlight, and operates on whole source files. Updated to work with the fix for [[bugs/multiple_pages_with_same_name]]. Untested with files with no extension, e.g. `Makefile`. -* [[user/jrblevin]]'s code plugin uses src-highlight, and supports both +* [[users/jasonblevins]]'s code plugin uses src-highlight, and supports both while file and directive use. ## General problems -- cgit v1.2.3 From 7f80e52543891690e3136855bc29917e6b431aba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 9 Nov 2008 15:31:57 -0500 Subject: Fix the link() pagespec to match links that are internally recorded as absolute. This fixes a problem exposed by the recent change to tags (a2839de9362187b67b0e3a564461e272e64fd9b4). That recorded tag links as absolute by including a leading slash in the link. The same could also be done with an absolute wikilink. In either case, link() would not match such links, unless the leading slash was included in the link to match. But that's not right, because pagespecs match absolute by default. So strip the leading slash. Note that to keep any existing `link(/foo)` pagespecs working after this change, the leading slash is removed from there, too. --- IkiWiki.pm | 4 ++++ debian/changelog | 2 ++ t/pagespec_match.t | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index 1aaa4d33c..dc9b66344 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1901,6 +1901,10 @@ sub match_link ($$;@) { #{{{ else { return IkiWiki::SuccessReason->new("$page links to page $p matching $link") if match_glob($p, $link, %params); + $p=~s/^\///; + $link=~s/^\///; + return IkiWiki::SuccessReason->new("$page links to page $p matching $link") + if match_glob($p, $link, %params); } } return IkiWiki::FailReason->new("$page does not link to $link"); diff --git a/debian/changelog b/debian/changelog index 424c99ac4..6c068806c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ ikiwiki (2.69) UNRELEASED; urgency=low * meta: Plugin is now enabled by default since the basewiki uses it. * txt: Do not encode quotes when filtering the txt, as that broke later parsing of any directives on the page. + * Fix the link() pagespec to match links that are internally recorded as + absolute. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 diff --git a/t/pagespec_match.t b/t/pagespec_match.t index c61d16122..7c0ac235b 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 56; +use Test::More tests => 58; BEGIN { use_ok("IkiWiki"); } @@ -40,6 +40,7 @@ $links{"bugs/bar"}=[qw{done}]; $links{"done"}=[]; $links{"examples/softwaresite/bugs/fails_to_frobnicate"}=[qw{done}]; $links{"examples/softwaresite/bugs/done"}=[]; +$links{"ook"}=[qw{/blog/tags/foo}]; ok(pagespec_match("foo", "link(bar)"), "link"); ok(pagespec_match("foo", "link(ba?)"), "glob link"); @@ -55,6 +56,8 @@ ok(pagespec_match("bar", "backlink(foo)"), "backlink"); ok(! pagespec_match("quux", "backlink(foo)"), "failed backlink"); ok(! pagespec_match("bar", ""), "empty pagespec should match nothing"); ok(! pagespec_match("bar", " "), "blank pagespec should match nothing"); +ok(pagespec_match("ook", "link(blog/tags/foo)"), "link internal absolute success"); +ok(pagespec_match("ook", "link(/blog/tags/foo)"), "link explicit absolute success"); $IkiWiki::pagectime{foo}=1154532692; # Wed Aug 2 11:26 EDT 2006 $IkiWiki::pagectime{bar}=1154532695; # after -- cgit v1.2.3 From 02ee6d40d403eac396cead15900b1441e3fe08d7 Mon Sep 17 00:00:00 2001 From: "http://a1fie.livejournal.com/" Date: Mon, 10 Nov 2008 01:44:19 -0500 Subject: vim syntax file linked --- doc/ikiwiki/markdown.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn index a4190945f..3bebaef65 100644 --- a/doc/ikiwiki/markdown.mdwn +++ b/doc/ikiwiki/markdown.mdwn @@ -6,7 +6,8 @@ email messages. It is the markup language used by this wiki by default. For documentation about the markdown syntax, see [[formatting]] and [Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A [markdown mode](http://jblevins.org/projects/markdown-mode/) for -emacs can help in editing. +emacs can help in editing, as can this +[syntax file](http://plasticboy.com/markdown-vim-mode/) for vim. Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part of the markdown syntax, and are the only bit of markup that this wiki -- cgit v1.2.3