fix(jira): complete document node types and scan contract fixtures

This commit is contained in:
Brennan Benson
2026-11-13 17:46:17 -08:00
parent 1335a6c8e2
commit 06fad320b2
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ function blockNode(value: unknown, media: MediaRenderer): BlockContent[] {
}
]
case 'listItem':
return listItem(node, media).children
return children()
case 'codeBlock':
return [
{
+2 -2
View File
@@ -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 {
+4 -1
View File
@@ -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: '<me@example.com> '.repeat(addresses) + 'a'.repeat(length % 15)