Skip to content

Commit

Permalink
Remove ancient undocument support for listItemIndent: 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 9, 2023
1 parent 2fcac46 commit 5b496da
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
6 changes: 0 additions & 6 deletions lib/util/check-list-item-indent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
export function checkListItemIndent(state) {
const style = state.options.listItemIndent || 'tab'

// To do: remove in a major.
// @ts-expect-error: deprecated.
if (style === 1 || style === '1') {
return 'one'
}

if (style !== 'tab' && style !== 'one' && style !== 'mixed') {
throw new Error(
'Cannot serialize items with `' +
Expand Down
22 changes: 0 additions & 22 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3249,28 +3249,6 @@ test('listItem', async function (t) {
}
)

await t.test(
'should use one space after the bullet for `listItemIndent: "1"` (deprecated)',
async function () {
assert.equal(
to(
{
type: 'listItem',
children: [
{type: 'paragraph', children: [{type: 'text', value: 'a'}]},
{type: 'thematicBreak'}
]
},
{
// @ts-expect-error: check how the runtime handles `listItemIdent` being wrong.
listItemIndent: '1'
}
),
'* a\n\n ***\n'
)
}
)

await t.test(
'should use one space after the bullet for `listItemIndent: "mixed"`, when the item is not spread',
async function () {
Expand Down

0 comments on commit 5b496da

Please sign in to comment.