Skip to content

Commit

Permalink
fix(richtext-lexical): fix default arg in normalizeMarkdown (#10424)
Browse files Browse the repository at this point in the history
Fix #10387

The default argument was true and then in the nested function false.
  • Loading branch information
GermanJablo authored Jan 7, 2025
1 parent a5443a1 commit 4d7587d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const TABLE_ROW_DIVIDER_REG_EXP = /^(\| ?:?-*:? ?)+\|\s?$/
const TAG_START_REGEX = /^[ \t]*<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i
const TAG_END_REGEX = /^[ \t]*<\/[a-z_][\w-]*\s*>/i

export function normalizeMarkdown(input: string, shouldMergeAdjacentLines = false): string {
export function normalizeMarkdown(input: string, shouldMergeAdjacentLines: boolean): string {
const lines = input.split('\n')
let inCodeBlock = false
const sanitizedLines: string[] = []
Expand Down Expand Up @@ -102,7 +102,7 @@ export function $convertFromMarkdownString(
transformers: Array<Transformer> = TRANSFORMERS,
node?: ElementNode,
shouldPreserveNewLines = false,
shouldMergeAdjacentLines = true, // Changed from false to true here
shouldMergeAdjacentLines = true,
): void {
const sanitizedMarkdown = shouldPreserveNewLines
? markdown
Expand Down

0 comments on commit 4d7587d

Please sign in to comment.