Skip to content

Commit

Permalink
test(ast): rename default variable set
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Aug 15, 2022
1 parent 487feb1 commit 0ec7742
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/better-write-contenteditable-ast/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
export const getRows = (text: string): string[] => {
return text
.split(new RegExp(/<div>(.*?)<\/div>/))
.map((text) => text.replaceAll('<br>', ' '))
.map((t) => t.replaceAll('<br>', ' '))
.filter(
(text) => text && !text.includes('<div>') && !text.includes('</div>')
(_) => _ && !_.includes('<div>') && !_.includes('</div>')
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/better-write-contenteditable-ast/test/row.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getRows } from '../src'
import { describe, expect, it } from 'vitest'

describe('Contenteditable AST - Rows', () => {
describe.concurrent('Contenteditable AST - Rows', () => {
it('should return a simple row.', () => {
expect(getRows('foo bar baz')).toStrictEqual(['foo bar baz'])
})
Expand Down

0 comments on commit 0ec7742

Please sign in to comment.