<math> mediawiki tag support
cleberps - October 10, 2009 - 21:32
| Project: | DruTeX |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | cleberps |
| Status: | needs review |
Description
Hi, I have been using Drutex to support mediawiki page import but mathematical formulas in mediawiki uses tag instead of $ $. To suport mediawiki math tag I included the following code to drutex_render.inc around line 114.
/* <math> environment */
$E[] = (object) array(
'pattern' => '@<math( [^>]*)?>(.+?)</math>@se',
'replacement' => "'$1' . drutex_render('$ $2 $', '<var>format</var>')",
'weight' => -8
);I think that this support could be useful to others that import mediawiki pages into drupal.
