Add syntax highlighting to error output
The color is in this format:
<bold>fidlbolt.fidl:4:15 </bold><invalid>error:</invalid>
<bold> error message</bold>
error span
<bold><keyword>^~~~~~~~~~</keyword><bold>
Where `invalid` and `keyword` are styles defined by Ace editor themes.
Change-Id: I26ebf699631b76773cbf24bb2b21e2196c15c8e6
diff --git a/frontend/src/ace-modes.js b/frontend/src/ace-modes.js
index 3b743d1..f78a298 100644
--- a/frontend/src/ace-modes.js
+++ b/frontend/src/ace-modes.js
@@ -20,6 +20,14 @@
token: 'invalid',
regex: /^(:?(:?Server|Network) )?Error:$/,
},
+ {
+ token: ['markup.bold', 'invalid', 'markup.bold'],
+ regex: /^([\w\-\/.~]+:[0-9]*:[0-9]*: )(error:)( .+)$/
+ },
+ {
+ token: 'markup.bold.keyword',
+ regex: /~*\^~*$/,
+ },
],
};
}