diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
commit | 99679d06884120c57f43b44e55e03595f1f87bed (patch) | |
tree | a3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php | |
parent | 655214ab30ee84884dc408488b85586f36263fcb (diff) | |
parent | d3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff) | |
download | wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.gz wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.zst wallabag-99679d06884120c57f43b44e55e03595f1f87bed.zip |
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php new file mode 100644 index 00000000..9a261729 --- /dev/null +++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Ruby.php | |||
@@ -0,0 +1,36 @@ | |||
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * XHTML 1.1 Ruby Annotation Module, defines elements that indicate | ||
5 | * short runs of text alongside base text for annotation or pronounciation. | ||
6 | */ | ||
7 | class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule | ||
8 | { | ||
9 | |||
10 | /** | ||
11 | * @type string | ||
12 | */ | ||
13 | public $name = 'Ruby'; | ||
14 | |||
15 | /** | ||
16 | * @param HTMLPurifier_Config $config | ||
17 | */ | ||
18 | public function setup($config) | ||
19 | { | ||
20 | $this->addElement( | ||
21 | 'ruby', | ||
22 | 'Inline', | ||
23 | 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))', | ||
24 | 'Common' | ||
25 | ); | ||
26 | $this->addElement('rbc', false, 'Required: rb', 'Common'); | ||
27 | $this->addElement('rtc', false, 'Required: rt', 'Common'); | ||
28 | $rb = $this->addElement('rb', false, 'Inline', 'Common'); | ||
29 | $rb->excludes = array('ruby' => true); | ||
30 | $rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number')); | ||
31 | $rt->excludes = array('ruby' => true); | ||
32 | $this->addElement('rp', false, 'Optional: #PCDATA', 'Common'); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | // vim: et sw=4 sts=4 | ||