Skip to content

Commit 9beae92

Browse files
committed
Fix to not force break adjacent block quotes
1 parent 1fe6184 commit 9beae92

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

lib/join.js

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ function joinDefaults(left, right, parent, context) {
99
(left.type === 'list' &&
1010
right.type === left.type &&
1111
Boolean(left.ordered) === Boolean(right.ordered)) ||
12-
// Adjacent quotes.
13-
(left.type === 'blockquote' && right.type === left.type) ||
1412
// Indented code after list or another indented code.
1513
(right.type === 'code' &&
1614
formatCodeAsIndented(right, context) &&

test.js

+4-22
Original file line numberDiff line numberDiff line change
@@ -94,28 +94,6 @@ test('core', function (t) {
9494
'should inject HTML comments between adjacent indented code'
9595
)
9696

97-
t.equal(
98-
to({
99-
type: 'root',
100-
children: [
101-
{
102-
type: 'blockquote',
103-
children: [
104-
{type: 'paragraph', children: [{type: 'text', value: 'a'}]}
105-
]
106-
},
107-
{
108-
type: 'blockquote',
109-
children: [
110-
{type: 'paragraph', children: [{type: 'text', value: 'b'}]}
111-
]
112-
}
113-
]
114-
}),
115-
'> a\n\n<!---->\n\n> b\n',
116-
'should inject HTML comments between two block quotes'
117-
)
118-
11997
t.equal(
12098
to({
12199
type: 'listItem',
@@ -2670,5 +2648,9 @@ test('roundtrip', function (t) {
26702648

26712649
t.equal(to(from(doc)), doc, 'should roundtrip indented blank lines in code')
26722650

2651+
doc = '> a\n\n> b\n'
2652+
2653+
t.equal(to(from(doc)), doc, 'should roundtrip adjacent block quotes')
2654+
26732655
t.end()
26742656
})

0 commit comments

Comments
 (0)