]> sipb.mit.edu Git - ikiwiki.git/commitdiff
question about the format directive and relation with htmlize hooks
authorAlexandreDupas <AlexandreDupas@web>
Sat, 8 Nov 2008 16:04:27 +0000 (11:04 -0500)
committerJoey Hess <joey@kitenet.net>
Sat, 8 Nov 2008 16:04:27 +0000 (11:04 -0500)
doc/plugins/format/discussion.mdwn [new file with mode: 0644]

diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn
new file mode 100644 (file)
index 0000000..b7d6ca7
--- /dev/null
@@ -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.