mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Make the aceAttribClasses hook harder to misuse
This commit is contained in:
parent
5aa318a09b
commit
ba6bdf35be
2 changed files with 13 additions and 9 deletions
|
@ -59,8 +59,9 @@ linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFun
|
|||
{
|
||||
|
||||
// Plugin Hook to add more Attrib Classes
|
||||
const results = hooks.callAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES);
|
||||
if (results.length >= 1) linestylefilter.ATTRIB_CLASSES = results[0];
|
||||
for (const attribClasses of hooks.callAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES)) {
|
||||
Object.assign(linestylefilter.ATTRIB_CLASSES, attribClasses);
|
||||
}
|
||||
|
||||
if (lineLength == 0) return textAndClassFunc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue