mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-02 12:52:38 +00:00
Fix Regex for Justified paragraphs
This commit is contained in:
@@ -380,11 +380,10 @@ const justifiedParagraphs = {
|
|||||||
name : 'justifiedParagraphs',
|
name : 'justifiedParagraphs',
|
||||||
level : 'block',
|
level : 'block',
|
||||||
start(src) {
|
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
|
}, // Hint to Marked.js to stop and check for a match
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, tokens) {
|
||||||
const regex = /^((:- ).*)|((-: ).*)|((:-: ).*)(?:\n|$)/ym;
|
const regex = /^(((:-))|((-:))|((:-:))) .+\n([^\n].*\n)*\n/ygm;
|
||||||
const match = regex.exec(src);
|
const match = regex.exec(src);
|
||||||
if(match?.length) {
|
if(match?.length) {
|
||||||
let whichJustify;
|
let whichJustify;
|
||||||
|
|||||||
Reference in New Issue
Block a user