From ac9fc720f7a77eb903bc41410198929e6d088175 Mon Sep 17 00:00:00 2001 From: David Bolack Date: Thu, 18 Jan 2024 09:51:11 -0600 Subject: [PATCH] Revert "A better regex for underlining." This reverts commit a88b256b6c0692eb1bf79cd4dfa7461a206869ee. --- shared/naturalcrit/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 9297717c1..2c7c95375 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -237,9 +237,9 @@ const superSubScripts = { const underline = { name : 'underline', level : 'inline', - start(src) { return src.match(/\b_(?![_\s])(.*?[^_\s])_\b/m)?.index;}, + start(src) { return src.match(/\w_[^_]_/m)?.index;}, tokenizer(src, tokens) { - const uRegex = /^\b_(?![_\s])(.*?[^_\s])_\b/m; + const uRegex = /^_([^_]*)_/m; const match = uRegex.exec(src); console.log('Looking'); if(match?.length) {