mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 20:33:51 +00:00
A better regex for underlining.
This commit is contained in:
@@ -237,9 +237,9 @@ const superSubScripts = {
|
||||
const underline = {
|
||||
name : 'underline',
|
||||
level : 'inline',
|
||||
start(src) { return src.match(/\w_[^_]_/m)?.index;},
|
||||
start(src) { return src.match(/\b_(?![_\s])(.*?[^_\s])_\b/m)?.index;},
|
||||
tokenizer(src, tokens) {
|
||||
const uRegex = /^_([^_]*)_/m;
|
||||
const uRegex = /^\b_(?![_\s])(.*?[^_\s])_\b/m;
|
||||
const match = uRegex.exec(src);
|
||||
console.log('Looking');
|
||||
if(match?.length) {
|
||||
|
||||
Reference in New Issue
Block a user