Merge branch 'master' of github.com:shish/shimmie2
This commit is contained in:
commit
a75d8744c9
@ -43,6 +43,14 @@ class Artists implements Extension {
|
||||
|
||||
if ($event instanceof PageRequestEvent)
|
||||
$this->handle_commands($event);
|
||||
|
||||
if ($event instanceof SearchTermParseEvent) {
|
||||
$matches = array();
|
||||
if(preg_match("/^author=(.*)$/", $event->term, $matches)) {
|
||||
$char = $matches[1];
|
||||
$event->add_querylet(new Querylet("Author = :author_char", array("author_char"=>$char)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function try_install() {
|
||||
|
@ -63,6 +63,7 @@ class BBCode extends FormatterExtension {
|
||||
$text = preg_replace("/\[li\](.*?)\[\/li\]/s", "<li>\\1</li>", $text);
|
||||
$text = preg_replace("#\[\*\]#s", "<li>", $text);
|
||||
$text = preg_replace("#<br><(li|ul|ol|/ul|/ol)>#s", "<\\1>", $text);
|
||||
$text = preg_replace("#\[align=(left|center|right)\](.*?)\[\/align\]#s", "<div style='text-align:\\1;'>\\2</div>", $text);
|
||||
$text = $this->filter_spoiler($text);
|
||||
$text = $this->insert_code($text);
|
||||
return $text;
|
||||
|
Loading…
x
Reference in New Issue
Block a user