package xm::code::html;
use xm::o;
use xm::code::vars;
use xm::code::func;
"
highlight sourcecode - HTML mode
"}
$LANGUAGE{'html'} = {
'filename' => '(?i)\\.html?$',
'regex' => '',
'patterns' => [
{
'name' => 'comment',
'regex' => '<!--.*?-->',
'style' => 'comment',
'childregex' => []
},
{
'name' => 'entity',
'regex' => '\\&[-.a-zA-Z0-9#]*;?',
'style' => 'entity',
'childregex' => []
},
{
'name' => 'tag',
'regex' => '<(/|!)?[-.a-zA-Z0-9]*.*?>',
'style' => 'predefined identifier',
'childregex' => [
{
'name' => 'double quote string',
'regex' => '".*?"',
'style' => 'string',
'childregex' => []
},
{
'name' => 'single quote string',
'regex' => '\'.*?\'',
'style' => 'string',
'childregex' => []
},
{
'name' => 'brackets',
'regex' => '[<>]',
'style' => 'braces',
'childregex' => []
},
{
'name' => 'attribute',
'regex' => '[^\'" ]+(?=.)',
'style' => 'identifier',
'childregex' => []
}
]
}
]
};
return xm::code::func::DO($_[0],$LANGUAGE{html}{patterns});
}
return xm::o::args_stdin(@_, DESC); }
return DO(xm::o::args_stdin(@_, DESC)); }
1;