// For documentation of the format, see README in this directory. var browserTests = [ ["foo[]bar", [["bold",""]], "foo[]bar", [true], {"bold":[false,false,"",false,true,""]}], ["

[foo

bar]

", [["stylewithcss","true"],["bold",""]], "

[foo

bar]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["

[foo

bar]

", [["stylewithcss","false"],["bold",""]], "

[foo

bar]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["[foo bar]", [["stylewithcss","true"],["bold",""]], "[foo bar]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["[foo bar]", [["stylewithcss","false"],["bold",""]], "[foo bar]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["

[foo

bar

baz]

", [["stylewithcss","true"],["bold",""]], "

[foo

bar

baz]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["

[foo

bar

baz]

", [["stylewithcss","false"],["bold",""]], "

[foo

bar

baz]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["

[foo


bar]", [["stylewithcss","true"],["bold",""]], "

[foo


bar]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["

[foo


bar]", [["stylewithcss","false"],["bold",""]], "

[foo


bar]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[]bar", [["bold",""]], "foo[]bar", [true], {"bold":[false,true,"",false,false,""]}], ["foo[]bar", [["bold",""]], "foo[]bar", [true], {"bold":[false,false,"",false,true,""]}], ["foo{}bar", [["bold",""]], "foo{}bar", [true], {"bold":[false,false,"",false,true,""]}], ["foo[]bar", [["bold",""]], "foo[]bar", [true], {"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[barbaz]qozquz", [["bold",""]], "foo[barbaz]qozquz", [true], {"bold":[true,false,"",false,true,""]}], ["foo[barbaz]qozquz", [["stylewithcss","true"],["bold",""]], "foo[barbaz]qozquz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[barbaz]qozquz", [["stylewithcss","false"],["bold",""]], "foo[barbaz]qozquz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["{

foo

}", [["stylewithcss","true"],["bold",""]], "{

foo

}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["{

foo

}", [["stylewithcss","false"],["bold",""]], "{

foo

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["bold",""]], "foo[bar]baz", [false], {"bold":[false,false,"",false,false,""]}], ["fo[obarb]az", [["stylewithcss","true"],["bold",""]], "fo[obarb]az", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["fo[obarb]az", [["stylewithcss","false"],["bold",""]], "fo[obarb]az", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["fooba[rb]az", [["bold",""]], "fooba[rb]az", [false], {"bold":[false,false,"",false,false,""]}], ["fo[ob]arbaz", [["bold",""]], "fo[ob]arbaz", [false], {"bold":[false,false,"",false,false,""]}], ["fo[obarb]az", [["stylewithcss","true"],["bold",""]], "fo[obarb]az", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["fo[obarb]az", [["stylewithcss","false"],["bold",""]], "fo[obarb]az", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["fo[obarb]az", [["bold",""]], "fo[obarb]az", [false], {"bold":[false,false,"",false,false,""]}], ["fooba[rb]az", [["bold",""]], "fooba[rb]az", [false], {"bold":[false,false,"",false,false,""]}], ["fo[ob]arbaz", [["bold",""]], "fo[ob]arbaz", [false], {"bold":[false,false,"",false,false,""]}], ["fo[obarb]az", [["bold",""]], "fo[obarb]az", [false], {"bold":[false,true,"",false,true,""]}], ["
foob[a]rbaz
", [["stylewithcss","true"],["bold",""]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["
foob[a]rbaz
", [["stylewithcss","false"],["bold",""]], "
foob[a]rbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","true"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["
foobarbaz
", [["stylewithcss","false"],["bold",""]], "{}
foobarbaz
", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["{
foobarbaz
}", [["stylewithcss","true"],["bold",""]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["{
foobarbaz
}", [["stylewithcss","false"],["bold",""]], "{
foobarbaz
}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foobar[baz]", [["bold",""]], "foobar[baz]", [true], {"bold":[false,false,"",false,true,""]}], ["[foo]barbaz", [["bold",""]], "[foo]barbaz", [true], {"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], // Should not use the near as alternative container of and // . ["foobar[baz]", [["bold",""]], "foobarbaz", [true], {"bold":[false,false,"",false,true,""]}], ["[foo]barbaz", [["bold",""]], "foobarbaz", [true], {"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["bold",""]], "foobarbaz", [true], {"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["bold",""]], "foo[bar]baz", [true], {"bold":[false,false,"",false,true,""]}], // Should not use the near as alternative container of // ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foobarbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], // Should use the near as new container ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foobarbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo{}baz", [["bold",""]], "foo{}baz", [true], {"bold":[false,false,"",false,true,""]}], ["foo{}baz", [["bold",""]], "foo{}baz", [true], {"bold":[false,false,"",false,true,""]}], ["foo{}baz", [["bold",""]], "foo{}baz", [true], {"bold":[false,false,"",false,true,""]}], ["foo{}baz", [["bold",""]], "foo{}baz", [true], {"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["bold",""]], "foo[bar]baz", [true], {"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["bold",""]], "foo[bar]baz", [true], {"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["bold",""]], "foo[bar]baz", [true], {"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["bold",""]], "foo[bar]baz", [true], {"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["{

foo

bar

}

baz

", [["stylewithcss","true"],["bold",""]], "{

foo

bar

}

baz

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["{

foo

bar

}

baz

", [["stylewithcss","false"],["bold",""]], "{

foo

bar

}

baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["

foo[bar}

baz

", [["stylewithcss","true"],["bold",""]], "

foo[bar}

baz

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["

foo[bar}

baz

", [["stylewithcss","false"],["bold",""]], "

foo[bar}

baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo [bar baz] qoz quz sic", [["bold",""]], "foo [bar baz] qoz quz sic", [true], {"bold":[true,false,"",false,true,""]}], ["foo bar baz [qoz quz] sic", [["bold",""]], "foo bar baz [qoz quz] sic", [true], {"bold":[true,false,"",false,true,""]}], ["bar [baz] qoz", [["stylewithcss","true"],["bold",""]], "bar [baz] qoz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["bar [baz] qoz", [["stylewithcss","false"],["bold",""]], "bar [baz] qoz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["{foobar]baz", [["stylewithcss","true"],["bold",""]], "{foobar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["{foobar]baz", [["stylewithcss","false"],["bold",""]], "{foobar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["{foobar]baz", [["stylewithcss","true"],["bold",""]], "{foobar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["{foobar]baz", [["stylewithcss","false"],["bold",""]], "{foobar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["{foobar]baz", [["stylewithcss","true"],["bold",""]], "{foobar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["{foobar]baz", [["stylewithcss","false"],["bold",""]], "{foobar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["{foobar]baz", [["bold",""]], "{foobar]baz", [true], {"bold":[false,true,"",false,false,""]}], ["foo[barbaz}", [["stylewithcss","true"],["bold",""]], "foo[barbaz}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[barbaz}", [["stylewithcss","false"],["bold",""]], "foo[barbaz}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[barbaz}", [["stylewithcss","true"],["bold",""]], "foo[barbaz}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[barbaz}", [["stylewithcss","false"],["bold",""]], "foo[barbaz}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[barbaz}", [["stylewithcss","true"],["bold",""]], "foo[barbaz}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[barbaz}", [["stylewithcss","false"],["bold",""]], "foo[barbaz}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[barbaz}", [["bold",""]], "foo[barbaz}", [true], {"bold":[false,true,"",false,false,""]}], ["

foo[bar]baz

", [["stylewithcss","true"],["bold",""]], "

foo[bar]baz

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["

foo[bar]baz

", [["stylewithcss","false"],["bold",""]], "

foo[bar]baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["{

foobar]baz

", [["stylewithcss","true"],["bold",""]], "{

foobar]baz

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["{

foobar]baz

", [["stylewithcss","false"],["bold",""]], "{

foobar]baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["

foo[barbaz

}", [["stylewithcss","true"],["bold",""]], "

foo[barbaz

}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["

foo[barbaz

}", [["stylewithcss","false"],["bold",""]], "

foo[barbaz

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["

[foobarbaz]

", [["stylewithcss","true"],["bold",""]], "

[foobarbaz]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["

[foobarbaz]

", [["stylewithcss","false"],["bold",""]], "

[foobarbaz]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["{

foobarbaz]

", [["stylewithcss","true"],["bold",""]], "{

foobarbaz]

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["{

foobarbaz]

", [["stylewithcss","false"],["bold",""]], "{

foobarbaz]

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["

[foobarbaz

}", [["stylewithcss","true"],["bold",""]], "

[foobarbaz

}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["

[foobarbaz

}", [["stylewithcss","false"],["bold",""]], "

[foobarbaz

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["{

foobarbaz

}", [["stylewithcss","true"],["bold",""]], "{

foobarbaz

}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["{

foobarbaz

}", [["stylewithcss","false"],["bold",""]], "{

foobarbaz

}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foobar[baz]quzqoz", [["stylewithcss","true"],["bold",""]], "foobar[baz]quzqoz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foobar[baz]quzqoz", [["stylewithcss","false"],["bold",""]], "foobar[baz]quzqoz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["{foo bar}", [["stylewithcss","true"],["bold",""]], "{foo bar}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[true,false,"",false,true,""]}], ["{foo bar}", [["stylewithcss","false"],["bold",""]], "{foo bar}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[true,false,"",false,true,""]}], ["{

foo

bar}", [["stylewithcss","true"],["bold",""]], "{

foo

bar}", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["{

foo

bar}", [["stylewithcss","false"],["bold",""]], "{

foo

bar}", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]", [["bold",""]], "foo[bar]", [true], {"bold":[false,false,"",false,true,""]}], ["foo{bar}baz", [["stylewithcss","true"],["bold",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","false"],["bold",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["[foobarbaz]", [["stylewithcss","true"],["bold",""]], "[foobarbaz]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["[foobarbaz]", [["stylewithcss","false"],["bold",""]], "[foobarbaz]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["[foo]", [["stylewithcss","true"],["bold",""]], "[foo]", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["[foo]", [["stylewithcss","false"],["bold",""]], "[foo]", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","true"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["foo[bar]baz", [["stylewithcss","false"],["bold",""]], "foo[bar]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["

foo[bar]baz

", [["stylewithcss","true"],["bold",""]], "

foo[bar]baz

", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["

foo[bar]baz

", [["stylewithcss","false"],["bold",""]], "

foo[bar]baz

", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["fo[ob]arbaz", [["bold",""]], "fo[ob]arbaz", [true], {"bold":[true,false,"",false,true,""]}], ["fooba[rb]az", [["bold",""]], "fooba[rb]az", [true], {"bold":[true,false,"",false,true,""]}], ["fo[obarb]az", [["stylewithcss","true"],["bold",""]], "fo[obarb]az", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[true,false,"",false,true,""]}], ["fo[obarb]az", [["stylewithcss","false"],["bold",""]], "fo[obarb]az", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[true,false,"",false,true,""]}], ["foo[b]arbaz", [["stylewithcss","true"],["bold",""]], "foo[b]arbaz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo[b]arbaz", [["stylewithcss","false"],["bold",""]], "foo[b]arbaz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["fooba[r]baz", [["stylewithcss","true"],["bold",""]], "fooba[r]baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["fooba[r]baz", [["stylewithcss","false"],["bold",""]], "fooba[r]baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","true"],["bold",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["foo{bar}baz", [["stylewithcss","false"],["bold",""]], "foo{bar}baz", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["fo[ob]arbaz", [["bold",""]], "fo[ob]arbaz", [true], {"bold":[true,false,"",false,true,""]}], ["fo[ob]ar", [["bold",""]], "fo[ob]ar", [true], {"bold":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,true,"",false,false,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[true,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[true,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","true"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,false,"",false,true,""],"bold":[false,false,"",false,true,""]}], ["fo[ob]ar", [["stylewithcss","false"],["bold",""]], "fo[ob]ar", [true,true], {"stylewithcss":[false,true,"",false,false,""],"bold":[false,false,"",false,true,""]}], // Don't delete non-editable node. ["abc[def]ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], // but delete editable node in non-editable node. ["abc[def]ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], // Check where the new style () will be applied. Basically, it should be // applied to minimized range as far as possible, but should not shrink the // range into the nodes entirely selected. ["abc[def]ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], ["abc[def]ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], ["abc{def}ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], ["abc{def}ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], ["abc[def]ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], ["abc[def]ghi", [["stylewithcss","false"],["bold",""]], "abcdefghi", [true,true], {}], ]