{"record":{"id":"f5449e7eeb8db1df","repo":"toeverything/AFFiNE","slug":"failed-to-parse-linked-doc-footnote-definition","errorCode":null,"errorMessage":"Failed to parse linked doc footnote definition:","messagePattern":"Failed to parse linked doc footnote definition:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/adapters/markdown.ts","lineNumber":75,"sourceCode":"          walkerContext\n            .openNode(\n              {\n                type: 'block',\n                id: nanoid(),\n                flavour: EmbedLinkedDocBlockSchema.model.flavour,\n                props: {\n                  pageId: docId,\n                  footnoteIdentifier,\n                  style: 'citation',\n                },\n                children: [],\n              },\n              'children'\n            )\n            .closeNode();\n          walkerContext.skipAllChildren();\n        } catch (err) {\n          console.warn('Failed to parse linked doc footnote definition:', err);\n          return;\n        }\n      },\n    },\n    fromBlockSnapshot: {\n      enter: (o, context) => {\n        const { configs, walkerContext } = context;\n        // Parse as link\n        if (!o.node.props.pageId) {\n          return;\n        }\n        const title = configs.get('title:' + o.node.props.pageId) ?? 'untitled';\n        const url = AdapterTextUtils.generateDocUrl(\n          configs.get('docLinkBaseUrl') ?? '',\n          String(o.node.props.pageId),\n          o.node.props.params ?? Object.create(null)\n        );\n        walkerContext","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/adapters/markdown.ts#L57-L93","documentation":"Warning logged in the embed-linked-doc markdown adapter when parsing the footnote definition for a linked-doc citation fails (invalid JSON or schema mismatch). The linked-doc block is not created from that footnote; the adapter skips it and continues converting the remaining content.","triggerScenarios":"Triggered when the embed-linked-doc markdown adapter cannot parse the footnote definition of a linked-doc node during markdown import, so the linked doc reference is skipped.","commonSituations":"Occurs when importing markdown containing a malformed linked-doc footnote. The linked doc embed is dropped; ensure the footnote definition is well-formed JSON.","solutions":["Fix the linked-doc footnote syntax.","Re-export the markdown with valid footnotes."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}