Skip to content

Commit

Permalink
[field] PT: fix string splitting regex
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin authored and rexxars committed Oct 6, 2020
1 parent e565f40 commit 92ac20f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ const startMarkSymbols = MARK_SYMBOLS.map(set => set[0]).concat(
)
const endMarkSymbols = MARK_SYMBOLS.map(set => set[1]).concat(ANNOTATION_SYMBOLS.map(set => set[1]))
const allSymbols = startMarkSymbols.concat(endMarkSymbols)

const markRegex = `/${allSymbols.join('|')}/g`
const markRegex = new RegExp(`${allSymbols.join('|')}`, 'g')

export function isPTSchemaType(schemaType: SchemaType): schemaType is ObjectSchemaType<Block> {
return schemaType.jsonType === 'object' && schemaType.name === 'block'
Expand Down

0 comments on commit 92ac20f

Please sign in to comment.