You are here

function workbench_parse_help in Workbench 8

Simplified display of help text without markdown module.

Parameters

$text: The help text markdown.

Return value

HTML

1 call to workbench_parse_help()
workbench_help in ./workbench.module
Implements hook_help().

File

./workbench.module, line 82
Workbench module file.

Code

function workbench_parse_help($text) {
  $find = "```\n\n";
  $replace = '</pre>';
  $text = str_replace($find, $replace, $text);
  $find = "```";
  $replace = '<pre>';
  $text = str_replace($find, $replace, $text);
  $find = [
    "\n",
  ];
  $replace = [
    '<br />',
  ];
  $text = str_replace($find, $replace, $text);
  return $text;
}