diff --git a/src/main/jira/adf-blocks.ts b/src/main/jira/adf-blocks.ts index 1485d5e0125..62dcf74f3ff 100644 --- a/src/main/jira/adf-blocks.ts +++ b/src/main/jira/adf-blocks.ts @@ -77,7 +77,7 @@ function blockNode(value: unknown, media: MediaRenderer): BlockContent[] { } ] case 'listItem': - return listItem(node, media).children + return children() case 'codeBlock': return [ { diff --git a/src/main/jira/adf-text-marks.ts b/src/main/jira/adf-text-marks.ts index 3e1df1c46b9..bd54280f28d 100644 --- a/src/main/jira/adf-text-marks.ts +++ b/src/main/jira/adf-text-marks.ts @@ -1,10 +1,10 @@ -import type { PhrasingContent } from 'mdast' +import type { Literal, PhrasingContent } from 'mdast' import { findProseUrlEnd } from '../../shared/prose-url-boundary' import { bareEmailSpans } from './adf-bare-email' import { escapeMarkdownTextLinkDestination } from './adf-media-destination' import { adfChildren, adfRecord, adfString } from './adf-nodes' -export type JiraMediaMarkdown = { type: 'jiraMedia'; value: string } +export type JiraMediaMarkdown = Literal & { type: 'jiraMedia'; value: string } declare module 'mdast' { // oxlint-disable-next-line typescript/consistent-type-definitions -- Module augmentation requires declaration merging. interface RootContentMap { diff --git a/src/main/jira/markdown-adf.test.ts b/src/main/jira/markdown-adf.test.ts index aae719cb80f..95dbf3410c1 100644 --- a/src/main/jira/markdown-adf.test.ts +++ b/src/main/jira/markdown-adf.test.ts @@ -258,7 +258,10 @@ it('bounds real email character reads through document read-back at N and 10N', const fixtures = [ { value: 'A'.repeat(length), expected: 'A'.repeat(length) }, { value: `${'a'.repeat(length - 2)}@x`, expected: `${'a'.repeat(length - 2)}\\@x` }, - { value: '@a. '.repeat(length / 4), expected: '@a. '.repeat(length / 4).trimEnd() }, + { + value: `${'@a. '.repeat(length / 4 - 1)}@a.x`, + expected: `${'@a. '.repeat(length / 4 - 1)}@a.x` + }, { value: 'me@example.com '.repeat(addresses) + 'a'.repeat(length % 15), expected: ' '.repeat(addresses) + 'a'.repeat(length % 15)