Ticket #25903: wp-tinymce-scheme.semicolons.diff
| File wp-tinymce-scheme.semicolons.diff, 2.4 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/js/tinymce/wp-tinymce-schema.js
15 15 16 16 function split(str, delim) { 17 17 return str.split(delim || ','); 18 } ;18 } 19 19 20 20 /** 21 21 * Unpacks the specified lookup and string data it will also parse it into an object … … 28 28 return value.replace(/[A-Z]+/g, function(key) { 29 29 return replace(lookup[key]); 30 30 }); 31 } ;31 } 32 32 33 33 // Unpack lookup 34 34 for (key in lookup) { … … 44 44 attributes : makeMap(attributes), 45 45 attributesOrder : attributes, 46 46 children : makeMap(children, '|', {'#comment' : {}}) 47 } 47 }; 48 48 }); 49 49 50 50 return elements; 51 } ;51 } 52 52 53 53 /** 54 54 * Returns the HTML5 schema and caches it in the mapCache. … … 177 177 } 178 178 179 179 return html5; 180 } ;180 } 181 181 182 182 /** 183 183 * Returns the HTML4 schema and caches it in the mapCache. … … 308 308 } 309 309 310 310 return html4; 311 } ;311 } 312 312 313 313 /** 314 314 * WordPress Core … … 409 409 } 410 410 411 411 return value; 412 } ;412 } 413 413 414 414 settings = settings || {}; 415 415 … … 446 446 // Converts a wildcard expression string to a regexp for example *a will become /.*a/. 447 447 function patternToRegExp(str) { 448 448 return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$'); 449 } ;449 } 450 450 451 451 // Parses the specified valid_elements string and adds to the current rules 452 452 // This function is a bit hard to read since it's heavily optimized for speed … … 587 587 } 588 588 } 589 589 } 590 } ;590 } 591 591 592 592 function setValidElements(valid_elements) { 593 593 elements = {}; … … 598 598 each(schemaItems, function(element, name) { 599 599 children[name] = element.children; 600 600 }); 601 } ;601 } 602 602 603 603 // Adds custom non HTML elements to the schema 604 604 function addCustomElements(custom_elements) { … … 632 632 }); 633 633 }); 634 634 } 635 } ;635 } 636 636 637 637 // Adds valid children to the schema object 638 638 function addValidChildren(valid_children) { … … 662 662 } 663 663 }); 664 664 } 665 } ;665 } 666 666 667 667 function getElementRule(name) { 668 668 var element = elements[name], i; … … 679 679 if (element.pattern.test(name)) 680 680 return element; 681 681 } 682 } ;682 } 683 683 684 684 if (!settings.valid_elements) { 685 685 // No valid elements defined then clone the elements from the schema spec