Skip to content

Commit f505879

Browse files
authored
fix: Allow setAnnotations to use custom className
Make setAnnotations could use custom className #4362 from FavorMylikes/patch-1
2 parents fb3820a + 3948937 commit f505879

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ace/layer/gutter.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ var Gutter = function(parentEl) {
9393
rowInfo.text.push(annoText);
9494

9595
var type = annotation.type;
96-
if (type == "error")
96+
var className = annotation.className;
97+
if (className)
98+
rowInfo.className = className;
99+
else if (type == "error")
97100
rowInfo.className = " ace_error";
98101
else if (type == "warning" && rowInfo.className != " ace_error")
99102
rowInfo.className = " ace_warning";

0 commit comments

Comments
 (0)