forked from 0x2620/oxjs
fix issues with automatically opening annotation folders; add annotations option to video player to make find work for all layers
This commit is contained in:
parent
61402492c6
commit
94cfbdb45c
7 changed files with 108 additions and 30 deletions
|
|
@ -75,7 +75,9 @@ Ox.highlightHTML <f> Highlight matches in an HTML string
|
|||
> Ox.highlightHTML('AT&T', 'amp', 'h')
|
||||
'AT&T'
|
||||
> Ox.highlightHTML('a <b> c', '<b>', 'h')
|
||||
'<span class="h">a <span class="h"><b></span> c'
|
||||
'a <span class="h"><b></span> c'
|
||||
> Ox.highlightHTML('a <br> c', 'b', 'h')
|
||||
'a <br> c'
|
||||
@*/
|
||||
Ox.highlightHTML = function(html, str, classname, tags) {
|
||||
var count = 0,
|
||||
|
|
@ -83,7 +85,19 @@ Ox.highlightHTML = function(html, str, classname, tags) {
|
|||
isTag = false,
|
||||
position,
|
||||
positions = [];
|
||||
tags = Ox.merge(tags || [], ['a', 'b', 'code', 'i', 's', 'sub', 'sup', 'u']);
|
||||
//fixme: default tags should be same as in parseHTML
|
||||
tags = Ox.merge(tags || [], [
|
||||
// inline formatting
|
||||
'b', 'code', 'i', 's', 'sub', 'sup', 'u',
|
||||
// block formatting
|
||||
'blockquote', 'h1', 'h2', 'h3', 'p', 'pre',
|
||||
// lists
|
||||
'li', 'ol', 'ul',
|
||||
// tables
|
||||
'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr',
|
||||
// other
|
||||
'a', 'br', 'img',
|
||||
]);
|
||||
str = Ox.encodeHTML(str).toLowerCase();
|
||||
Ox.forEach(html.toLowerCase(), function(chr, i) {
|
||||
// check for entity or tag start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue