This is a simple, awesome, useful module.

It would be great to add a hook or some integration mechanism to the module_instructions_show() function so the README file could be rendered in different ways, for example as Markdown or some other format. The thinking is that other modules could intercept the rendering and introduce logic based on thinks like the file suffix to determine how to render the file as opposed to just outputting plain test. This would allow for GitHub-like functionality, which I think could be very useful.

I am aware that this feature request is at odds with the standard module documentation guidelines, but I thought I would raise the issue anyways.

Thanks for a useful little module,
Chris

Comments

alesr’s picture

Status: Active » Needs review

Hi Chris,

This is a good feature request. I implemented it and you can test it in 7.x.1-x-dev latest release (2012-May-03).
The hook is named: hook_module_instructions_content_renderer($fullpath, $filter)

cpliakas’s picture

Thanks! Look forward to testing.

Again, thanks for a really cool module,
Chris

alesr’s picture

Status: Needs review » Fixed
Robin Millette’s picture

This is also being tackled in the Advanced help module: #1405734: Output READMEs as parsed Markdown

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gisle’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

This hook is only present in dev (not in the full release). I don't think an issue should be closed before it is present in the recommended release.

Also: the value of the hook as implemented is nil, as the names of the file names to look for (README.txt and INSTALL.txt) are hard-coded in the module. A readme-file with markdown will, for instance, be named README.md, and will not be detected. For the hook to be useful, it must be possible to specify additional file extensions and what content renderer to use with each extension.

Finally: A hook and its use should be properly documented.

And it would not harm if there was a sub-module that implemented this hook and showed how it could be use to render markdown text.

aohrvetpv’s picture

This hook is only present in dev (not in the full release). I don't think an issue should be closed before it is present in the recommended release.

"Fixed" is valid whenever a patch is committed that fixes the issue. No release is necessary to set an issue's status to "Fixed". See https://www.drupal.org/node/156119. This is the workflow used for Drupal core.

Leaving the issue "Active" per the rest of #6.

astonvictor’s picture

Status: Active » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks