mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Fix Regex for Justified paragraphs
This commit is contained in:
@@ -380,11 +380,10 @@ const justifiedParagraphs = {
|
||||
name : 'justifiedParagraphs',
|
||||
level : 'block',
|
||||
start(src) {
|
||||
return src.match(/\n(?:-:|:-|:-:) {1}/m)?.index;
|
||||
|
||||
return src.match(/\n(?:-:|:-|-:) {1}/m)?.index;
|
||||
}, // Hint to Marked.js to stop and check for a match
|
||||
tokenizer(src, tokens) {
|
||||
const regex = /^((:- ).*)|((-: ).*)|((:-: ).*)(?:\n|$)/ym;
|
||||
const regex = /^(((:-))|((-:))|((:-:))) .+\n([^\n].*\n)*\n/ygm;
|
||||
const match = regex.exec(src);
|
||||
if(match?.length) {
|
||||
let whichJustify;
|
||||
|
||||
Reference in New Issue
Block a user