git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
18080c6
Branches
Tags
master
midgard
vorlage
fs-draft.git
source
logic
server
misc.php
foo
fenris
commited
18080c6
at 2016-04-24 18:00:07
misc.php
Blame
History
Raw
<?php function mark($core, $classes) { return ('<span class="' . implode(" ", $classes) . '">' . $core . '</span>'); } function format($string, $classes = ["word", "lang_fs"]) { if ($string == NULL) { $string = "--"; } else { $string = preg_replace("/\/([^\/]*)\//", mark("$1", ["ipa"]), $string); $string = preg_replace("/_([^_]*)_/", "<u>$1</u>", $string); $string = preg_replace("/\'([^\']*)\'/", mark("$1", $classes), $string); } return $string; } ?>