Represents a reference-style link definition.
Reference links are defined separately from their usage (e.g., [1]: https://example.com) and can be referenced multiple times throughout the document.
Working with reference links
const references: LinkReference[] = parsedFile.references; references.forEach(ref => { console.log(`Reference [${ref.id}]: ${ref.url}`); if (ref.title) { console.log(` Title: ${ref.title}`); } }); Copy
const references: LinkReference[] = parsedFile.references; references.forEach(ref => { console.log(`Reference [${ref.id}]: ${ref.url}`); if (ref.title) { console.log(` Title: ${ref.title}`); } });
Reference ID
Line number where reference is defined
Optional title
URL/path
Represents a reference-style link definition.
Reference links are defined separately from their usage (e.g., [1]: https://example.com) and can be referenced multiple times throughout the document.
Example
Working with reference links