diff --git a/testsuite/tests/input/tex/Newcommand.test.ts b/testsuite/tests/input/tex/Newcommand.test.ts
index 8010f58a6..c430f744b 100644
--- a/testsuite/tests/input/tex/Newcommand.test.ts
+++ b/testsuite/tests/input/tex/Newcommand.test.ts
@@ -728,4 +728,4 @@ describe('Nested Environments', () => {
/**********************************************************************************/
/**********************************************************************************/
-afterAll(() => getTokens('newcommand'));
+ afterAll(() => getTokens('newcommand'));
diff --git a/testsuite/tests/input/tex/__snapshots__/Mathtools.test.ts.snap b/testsuite/tests/input/tex/__snapshots__/Mathtools.test.ts.snap
index cd5d5956b..51e18f233 100644
--- a/testsuite/tests/input/tex/__snapshots__/Mathtools.test.ts.snap
+++ b/testsuite/tests/input/tex/__snapshots__/Mathtools.test.ts.snap
@@ -2298,11 +2298,11 @@ exports[`Mathtools Paired Delimiters DeclarePairedDelimiterX 1`] = `
exports[`Mathtools Paired Delimiters DeclarePairedDelimiterXPP 1`] = `
""
`;
diff --git a/testsuite/tests/input/tex/__snapshots__/Newcommand.test.ts.snap b/testsuite/tests/input/tex/__snapshots__/Newcommand.test.ts.snap
index 3e42f8a6d..35f2f7978 100644
--- a/testsuite/tests/input/tex/__snapshots__/Newcommand.test.ts.snap
+++ b/testsuite/tests/input/tex/__snapshots__/Newcommand.test.ts.snap
@@ -80,7 +80,7 @@ exports[`Nested Environments Newenvironment with Begin 1`] = `
exports[`Newcommand Ams Let Bar 1`] = `
""
`;
diff --git a/testsuite/tests/input/tex/__snapshots__/Physics.test.ts.snap b/testsuite/tests/input/tex/__snapshots__/Physics.test.ts.snap
index 6764e3b9f..218039580 100644
--- a/testsuite/tests/input/tex/__snapshots__/Physics.test.ts.snap
+++ b/testsuite/tests/input/tex/__snapshots__/Physics.test.ts.snap
@@ -6566,7 +6566,7 @@ exports[`Physics6_0 BraKet_Bra_4 1`] = `
b
- |
+ |
a
@@ -6586,7 +6586,7 @@ exports[`Physics6_0 BraKet_Bra_5 1`] = `
b
- |
+ |
a
@@ -6817,7 +6817,7 @@ exports[`Physics6_1 BraKet_Braket_2 1`] = `
A
- |
+ |
A
@@ -6834,7 +6834,7 @@ exports[`Physics6_1 BraKet_Braket_3 1`] = `
b
- |
+ |
a
@@ -6869,7 +6869,7 @@ exports[`Physics6_1 BraKet_Braket_5 1`] = `
a
- |
+ |
a
@@ -6925,7 +6925,7 @@ exports[`Physics6_1 BraKet_Braket_8 1`] = `
b
- |
+ |
A
@@ -6967,7 +6967,7 @@ exports[`Physics6_1 BraKet_Braket_10 1`] = `
b
- |
+ |
a
@@ -7007,7 +7007,7 @@ exports[`Physics6_1 BraKet_Braket_12 1`] = `
b
- |
+ |
⟩
"
@@ -7252,7 +7252,7 @@ exports[`Physics6_2 BraKet_Ketbra_10 1`] = `
b
- |
+ |
A
"
`;
@@ -7495,11 +7495,11 @@ exports[`Physics6_3 BraKet_Expect_6 1`] = `
B
- |
+ |
A
- |
+ |
A
@@ -7606,11 +7606,11 @@ exports[`Physics6_3 BraKet_Expect_11 1`] = `
B
- |
+ |
A
- |
+ |
A
@@ -7720,14 +7720,14 @@ exports[`Physics6_3 BraKet_Expect_15 1`] = `
Φ
- |
+ |
A
B
- |
+ |
Ψ
@@ -7874,14 +7874,14 @@ exports[`Physics6_4 BraKet_MatrixEl_4 1`] = `
n
- |
+ |
a
b
- |
+ |
m
@@ -7898,14 +7898,14 @@ exports[`Physics6_4 BraKet_MatrixEl_5 1`] = `
b
- |
+ |
a
b
- |
+ |
a
diff --git a/ts/input/tex/ParseMethods.ts b/ts/input/tex/ParseMethods.ts
index c3e037dde..38784b12c 100644
--- a/ts/input/tex/ParseMethods.ts
+++ b/ts/input/tex/ParseMethods.ts
@@ -195,6 +195,9 @@ const ParseMethods = {
// @test Fenced2, Delimiter (AMS)
def = Object.assign({ fence: false, stretchy: false }, def);
const node = parser.create('token', 'mo', def, delim.char);
+ if (delim.char === '|') {
+ node.setProperty('keep-attrs', 'stretchy');
+ }
parser.Push(node);
},