diff -u b/asciidoc.install b/asciidoc.install --- b/asciidoc.install +++ b/asciidoc.install @@ -14,22 +14,25 @@ 'asciidoctor', ]; - $is_command_avaiable = FALSE; + $is_command_available = FALSE; foreach ($commands as $command) { exec(sprintf('%s --version', $command), $output, $ret); if ($ret == 0) { - $is_command_avaiable = TRUE; + $is_command_available = TRUE; break; } } - if ($is_command_avaiable) { - $severity = NULL; - $version = substr(array_shift($output), 9); + if ($is_command_available) { + $severity = REQUIREMENT_OK; + $version = $output[0]; } else { $severity = REQUIREMENT_ERROR; - $version = t('You need to install AsciiDoc in order to use the AsciiDoc filter module.', array('@official_site' => 'http://www.methods.co.nz/asciidoc/index.html')); + $version = t('You need to install AsciiDoc or Asciidoctor in order to use the AsciiDoc filter module.', array( + '@url_asciidoc' => 'http://www.methods.co.nz/asciidoc/index.html', + '@url_asciidoctor' => 'http://asciidoctor.org', + )); } return array(