1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-11 01:36:20 +02:00

PSR-2 reformatting PHPDoc corrections

With minor corrections.

Signed-off-by: Marcus Bointon <marcus@synchromedia.co.uk>
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Marcus Bointon
2013-07-16 13:56:14 +02:00
committed by Edward Z. Yang
parent 19eee14899
commit fac747bdbd
433 changed files with 13302 additions and 6690 deletions

View File

@ -5,15 +5,23 @@
*/
class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
{
/**
* @type string
*/
public $name = 'Tables';
public function setup($config) {
/**
* @param HTMLPurifier_Config $config
*/
public function setup($config)
{
$this->addElement('caption', false, 'Inline', 'Common');
$this->addElement('table', 'Block',
new HTMLPurifier_ChildDef_Table(), 'Common',
$this->addElement(
'table',
'Block',
new HTMLPurifier_ChildDef_Table(),
'Common',
array(
'border' => 'Pixels',
'cellpadding' => 'Length',
@ -34,12 +42,12 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
$cell_t = array_merge(
array(
'abbr' => 'Text',
'abbr' => 'Text',
'colspan' => 'Number',
'rowspan' => 'Number',
// Apparently, as of HTML5 this attribute only applies
// to 'th' elements.
'scope' => 'Enum#row,col,rowgroup,colgroup',
'scope' => 'Enum#row,col,rowgroup,colgroup',
),
$cell_align
);
@ -50,20 +58,18 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
$cell_col = array_merge(
array(
'span' => 'Number',
'span' => 'Number',
'width' => 'MultiLength',
),
$cell_align
);
$this->addElement('col', false, 'Empty', 'Common', $cell_col);
$this->addElement('col', false, 'Empty', 'Common', $cell_col);
$this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col);
$this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align);
$this->addElement('thead', false, 'Required: tr', 'Common', $cell_align);
$this->addElement('tfoot', false, 'Required: tr', 'Common', $cell_align);
}
}
// vim: et sw=4 sts=4