Home » Text » Text_Wiki » Bug #4634
Code block title/filename
Details
| Request #4634 | Code block title/filename |
|---|---|
| Submitted | 2005-06-19 21:31 UTC |
| From | ben at horde dot org |
| Assigned | toggg |
| Status | Closed |
| Package | Text_Wiki |
| PHP Version | 4.3.11 |
| OS | Linux (gentoo) |
| Roadmaps | (Not assigned) |
Comments
[2005-06-19 21:31 UTC] ben at horde dot org
Description:
------------
I'd like to be able to give a title, or filename attribute to code blocks. An example of how this would be useful is for specifying a filename in howto documents, so the reader can easily determine which file this code belongs in. I envision displaying the file name in italics, either directly above, or directly below the code block, with little or no padding.
A small patch is provided to demonstrate what I'm looking for.
Reproduce code:
---------------
--- Code.php.bak 2005-06-19 16:26:41.000000000 -0500
+++ Code.php 2005-06-19 16:20:19.000000000 -0500
@@ -96,6 +96,10 @@
$text = "$text";
}
+ if (isset($options['attr']['filename'])) {
+ $text = '' . $options['attr']['filename'] . '' . $text;
+ }
+
return "\n$text\n\n";
}
}