Differences
This shows you the differences between the selected revision and the current version of the page.
| discussion:mediawiki2html_machine 2006/12/12 21:51 | discussion:mediawiki2html_machine 2007/07/01 16:49 current | ||
| Line 6: | Line 6: | ||
| * http://en.wikipedia.org/wiki/Wikipedia:Tools/Editing_tools | * http://en.wikipedia.org/wiki/Wikipedia:Tools/Editing_tools | ||
| * http://meta.wikimedia.org/wiki/Alternative_parsers | * http://meta.wikimedia.org/wiki/Alternative_parsers | ||
| + | |||
| + | ===== Questions ===== | ||
| + | |||
| + | Is this method not better? | ||
| + | |||
| + | ''// headings | ||
| + | for($i=7;$i>0;$i--){ | ||
| + | $html = preg_replace( | ||
| + | '/[=]{'.$i.'}([^\n\']+)[=]{'.$i.'}/', | ||
| + | '<h'.$i.'>${1}</h'.$i.'>', | ||
| + | $html | ||
| + | ); | ||
| + | }'' | ||