1
0
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:
8chan 2015-01-30 21:12:03 -08:00
parent 54a00f9c4d
commit f4e0b415ac
2 changed files with 32 additions and 0 deletions

View File

@ -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>");

View File

@ -1016,4 +1016,12 @@ span.pln {
}
div.mix {
display: inline-block;
}
/* Mona Font */
.aa {
font-family: Mona, "MS PGothic", " Pゴシック", sans-serif;
display: block!important;
font-size: 12pt;
}