PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Wiki » Bug #4634

Code block title/filename

Details

Request #4634Code block title/filename
Submitted2005-06-19 21:31 UTC
Fromben at horde dot org
Assignedtoggg
StatusClosed
PackageText_Wiki
PHP Version4.3.11
OSLinux (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";
}
}