Skip to content

Commit d8e3bf9

Browse files
emilyklcamdecoster
andauthored
Update src/lib/svg_text_utils.js
Co-authored-by: Cameron DeCoster <cameron.decoster@gmail.com>
1 parent 8895c4c commit d8e3bf9

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/lib/svg_text_utils.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ var FIND_TEX = /([^$]*)([$]+[^$]*[$]+)([^$]*)/;
2121
* @return {?Array} the regex match array (truthy) if the string contains tex,
2222
* otherwise null (for an empty/missing string or when no tex delimiters are found).
2323
*/
24-
function matchTex(str) {
25-
if (!str) return null;
26-
return str.match(FIND_TEX);
27-
}
24+
const matchTex = (str) => str ? str.match(FIND_TEX) : null;
2825
exports.matchTex = matchTex;
2926

3027
exports.convertToTspans = function(_context, gd, _callback) {

0 commit comments

Comments
 (0)