aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn
diff options
context:
space:
mode:
authorhttp://joeyh.name/ <joey@web>2013-03-28 18:06:05 -0400
committeradmin <admin@branchable.com>2013-03-28 18:06:05 -0400
commita0627fb91a0b14118b5bf19a7cba6cbfc6d1fef4 (patch)
tree1547454807e50faf77439eb15996d51a9519d9b0 /doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn
parentbd7f580690fc2bcd1fb8e23be3a8ae36b5de5dcd (diff)
downloadikiwiki-a0627fb91a0b14118b5bf19a7cba6cbfc6d1fef4.tar
ikiwiki-a0627fb91a0b14118b5bf19a7cba6cbfc6d1fef4.tar.gz
Diffstat (limited to 'doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn')
-rw-r--r--doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn b/doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn
index a13218883..483995775 100644
--- a/doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn
+++ b/doc/todo/Fenced_code_blocks___40__from_GitHub_Flavored_Markdown__41__.mdwn
@@ -6,3 +6,17 @@ GitHub's flavor of markdown adds fenced code blocks, delimited by triple-backquo
```
That syntax proves quite a bit more convenient in many cases, because it doesn't require modifying every line of the code block to add indentation. Please consider adding optional support for this in ikiwiki. Please also consider turning it on by default for new wikis, though not for existing wikis since it could *potentially* break backward compatibility with existing content.
+
+> I don't think that's an official markdown feature, although it might be available
+> as an extension in some markdown library or other -- possibly one of the ones
+> supported by ikiwiki.
+>
+> However, aside from compatability, ikiwiki already provides a way to do it that does not
+> require indenting the code: The [[ikiwiki/directive/format]] directive. Which has the benefit of
+> also telling it what kind of code it is, so it can syntax highlight it. Example:
+
+[[!format haskell """
+main :: IO ()
+main = forever $
+ putStrLn "hello, world!"
+"""]]