| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Provide verbatim environments (these will be hidden by all further DruTeX parsing).
|
| 7 |
*
|
| 8 |
* Note that a missing subhook_info() means that this submodule cannot be disabled (without hacking).
|
| 9 |
*/
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of subhook_info().
|
| 13 |
*/
|
| 14 |
function drutex_verbatim_info($format = -1) {
|
| 15 |
return (object) array(
|
| 16 |
'title' => t('Numbering / Referencing'),
|
| 17 |
'description' => t('Provide verbatim environments (these will be hidden by all further DruTeX parsing).'),
|
| 18 |
'toggle' => false,
|
| 19 |
'weight' => 20
|
| 20 |
);
|
| 21 |
}
|
| 22 |
|
| 23 |
/**
|
| 24 |
* Implementation of subhook_defaults().
|
| 25 |
*/
|
| 26 |
function drutex_verbatim_defaults() {
|
| 27 |
$D['drutex_verbatim_active'] = true;
|
| 28 |
return $D;
|
| 29 |
}
|
| 30 |
|
| 31 |
/**
|
| 32 |
* Implementation of subhook_node2html().
|
| 33 |
*/
|
| 34 |
function drutex_verbatim_node2html() {
|
| 35 |
$E = array();
|
| 36 |
|
| 37 |
/* <code>*</code> */
|
| 38 |
$E[] = (object) array(
|
| 39 |
'pattern' => '@<code>(.+?)</code>@se',
|
| 40 |
'replacement' => "_drutex_hide('set', '$0')",
|
| 41 |
'weight' => -100,
|
| 42 |
);
|
| 43 |
|
| 44 |
/* <notex>*</notex> */
|
| 45 |
$E[] = (object) array(
|
| 46 |
'pattern' => '@<notex>(.+?)</notex>@se',
|
| 47 |
'replacement' => "_drutex_hide('set', '$1')",
|
| 48 |
'weight' => -100,
|
| 49 |
);
|
| 50 |
|
| 51 |
return $E;
|
| 52 |
}
|