mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-02 15:02:38 +00:00
Add one more test that was failing
This commit is contained in:
@@ -138,6 +138,23 @@ describe('Inline-level variables', ()=>{
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p>My name is Bill Jones</p> <p>Bob</p>`.trimReturns());
|
||||
});
|
||||
|
||||
it('Only captures nested parens if balanced', function() {
|
||||
const source = dedent`
|
||||
$[var1](A variable (with nested parens) inside)
|
||||
|
||||
$[var1]
|
||||
|
||||
$[var2](A variable ) with unbalanced parens)
|
||||
|
||||
$[var2]`;
|
||||
const rendered = Markdown.render(source).trimReturns();
|
||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
|
||||
<p>A variable (with nested parens) inside</p>
|
||||
<p>A variable (with nested parens) inside</p>
|
||||
<p>A variable with unbalanced parens)</p>
|
||||
<p>A variable</p>
|
||||
`.trimReturns());
|
||||
});
|
||||
});
|
||||
|
||||
describe('Math', ()=>{
|
||||
|
||||
Reference in New Issue
Block a user