Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions __tests__/paragraph-blank-lines.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,5 +565,23 @@ ruleTest({
\t\tbb
`,
},
{ // accounts for https://github.com/platers/obsidian-linter/issues/1395
testName: 'A paragraph starting with an asterisk for either italics or bold should have a blank line added',
before: dedent`
# Header
**emphasis** blah blah...
*italics* more content here...
abcabc
`,
after: dedent`
# Header
${''}
**emphasis** blah blah...
${''}
*italics* more content here...
${''}
abcabc
`,
},
],
});
2 changes: 1 addition & 1 deletion src/utils/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const checklistBoxStartsTextRegex = new RegExp(`^${checklistBoxIndicator}
export const indentedOrBlockquoteNestedChecklistIndicatorRegex = new RegExp(`^${lineStartingWithWhitespaceOrBlockquoteTemplate}- ${checklistBoxIndicator} `);
export const nonBlockquoteChecklistRegex = new RegExp(`^\\s*- ${checklistBoxIndicator} `);

export const startsWithListMarkerRegex = new RegExp(`^\\s*(-|\\*|\\+|\\d+[.)]|- (${checklistBoxIndicator}))`, 'm');
export const startsWithListMarkerRegex = new RegExp(`^\\s*(- |\\* |\\+ |\\d+[.)] |- (${checklistBoxIndicator}) )`, 'm');

export const footnoteDefinitionIndicatorAtStartOfLine = /^(\[\^[^\]]*\]) ?([,.;!:?])/gm;
export const calloutRegex = /^(>\s*)+\[![^\s]*\]/m;
Expand Down