There was an error while loading. Please reload this page.
1 parent 8895c4c commit d8e3bf9Copy full SHA for d8e3bf9
1 file changed
src/lib/svg_text_utils.js
@@ -21,10 +21,7 @@ var FIND_TEX = /([^$]*)([$]+[^$]*[$]+)([^$]*)/;
21
* @return {?Array} the regex match array (truthy) if the string contains tex,
22
* otherwise null (for an empty/missing string or when no tex delimiters are found).
23
*/
24
-function matchTex(str) {
25
- if (!str) return null;
26
- return str.match(FIND_TEX);
27
-}
+const matchTex = (str) => str ? str.match(FIND_TEX) : null;
28
exports.matchTex = matchTex;
29
30
exports.convertToTspans = function(_context, gd, _callback) {
0 commit comments