web_writer/includes/parsedown/ParsedownExtra.php

19 lines
526 B
PHP
Executable File

<?php
require_once 'Parsedown.php';
class ParsedownExtra extends Parsedown {
protected function blockQuote($Line) {
// Îáðàáîòêà äèàëîãîâ
if (preg_match('/^—\s+/', $Line['text'])) {
return array(
'element' => array(
'name' => 'div',
'attributes' => array('class' => 'dialogue'),
'text' => ltrim($Line['text'], '— ')
)
);
}
return parent::blockQuote($Line);
}
}