]> scripts.mit.edu Git - www/ikiwiki.git/blobdiff - doc/todo/inline_raw_files.mdwn
another way
[www/ikiwiki.git] / doc / todo / inline_raw_files.mdwn
index 58920cc126051ddb34d7cfb83ab18dd46621b4b5..ef7fcb12c024f1c280e6220ec1555079e86300bc 100644 (file)
@@ -64,3 +64,27 @@ usage
 >>> will be easier to merge or reject.  Note the new branch name:
 >>> `raw_inline`. I'll open separate todo items for items mentioned in my
 >>> previous comment. --[[wtk]]
+
+---- 
+
+Reviewing your patch the first thing I see is this:
+
+<pre>
++        if (! $file) {
++               error("Missing file.");
++        }
+</pre>
+
+This fails if the filename is "0". Also, `pagetype()`
+currently cannot fail; allowing it to crash the entire
+wiki build if the filename is somehow undefined seems
+unwise.
+
+I didn't look much further, because it seems to me what you're trying to do
+can be better accomplished by using the highlight plugin. Assuming the raw
+file you want to inline and comment on is some source-code-like thing,
+which seems likely.
+
+Or, another way to do it would be to use the templates plugin, and make
+a template there that puts an inline directive inside pre tags.
+ --[[Joey]] [[!tag reviewed]]