From f11bdc1b440d5777b55e55e0313195b618f3d977 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 9 Dec 2014 01:31:40 +0000 Subject: [PATCH] also logic to add attributes for properties --- src/static/js/linestylefilter.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/static/js/linestylefilter.js b/src/static/js/linestylefilter.js index cb1ee1d50..757fac5ae 100644 --- a/src/static/js/linestylefilter.js +++ b/src/static/js/linestylefilter.js @@ -34,7 +34,6 @@ var linestylefilter = {}; var _ = require('./underscore'); var AttributeManager = require('./AttributeManager'); - linestylefilter.ATTRIB_CLASSES = { 'bold': 'tag:b', 'italic': 'tag:i', @@ -59,6 +58,13 @@ linestylefilter.getAuthorClassName = function(author) linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFunc, apool) { + // Plugin Hook to add more Attrib Classes + hooks.aCallAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES, function(err, ATTRIB_CLASSES){ + if(ATTRIB_CLASSES){ + linestylefilter.ATTRIB_CLASSES = ATTRIB_CLASSES[0]; + } + }); + if (lineLength == 0) return textAndClassFunc; var nextAfterAuthorColors = textAndClassFunc;