mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 23:50:11 +01:00
[aa] tags - ASCII art
This commit is contained in:
parent
54a00f9c4d
commit
f4e0b415ac
@ -633,6 +633,30 @@
|
||||
* ====================
|
||||
*/
|
||||
|
||||
// JIS ASCII art. This *must* be the first markup or it won't work.
|
||||
$config['markup'][] = array(
|
||||
"/\[(aa|code)\](.+?)\[\/(?:aa|code)\]/ms",
|
||||
function($matches) {
|
||||
$markupchars = array('_', '\'', '~', '*', '=');
|
||||
$replacement = $markupchars;
|
||||
array_walk($replacement, function(&$v) {
|
||||
$v = "&#".ord($v).";";
|
||||
});
|
||||
|
||||
// These are hacky fixes for ###board-tags### and >quotes.
|
||||
$markupchars[] = '###';
|
||||
$replacement[] = '###';
|
||||
$markupchars[] = '>';
|
||||
$replacement[] = '>';
|
||||
|
||||
if ($matches[1] === 'aa') {
|
||||
return '<span class="aa">' . str_replace($markupchars, $replacement, $matches[2]) . '</span>';
|
||||
} else {
|
||||
return str_replace($markupchars, $replacement, $matches[0]);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// "Wiki" markup syntax ($config['wiki_markup'] in pervious versions):
|
||||
$config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>");
|
||||
$config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>");
|
||||
|
@ -1016,4 +1016,12 @@ span.pln {
|
||||
}
|
||||
div.mix {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Mona Font */
|
||||
|
||||
.aa {
|
||||
font-family: Mona, "MS PGothic", "MS Pゴシック", sans-serif;
|
||||
display: block!important;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user