| | |
| | | if ( |
| | | opts.prettyLinks && |
| | | node.children.length === 1 && |
| | | node.children[0].type === "text" |
| | | node.children[0].type === "text" && |
| | | !node.children[0].value.startsWith("#") |
| | | ) { |
| | | node.children[0].value = path.basename(node.children[0].value) |
| | | } |
| | |
| | | typeof node.properties.src === "string" |
| | | ) { |
| | | if (!isAbsoluteUrl(node.properties.src)) { |
| | | let dest = node.properties.src as RelativeURL |
| | | const ext = path.extname(node.properties.src) |
| | | node.properties.src = |
| | | transformLink(joinSegments("assets", node.properties.src)) + ext |
| | | dest = node.properties.src = transformLink(dest) |
| | | node.properties.src = dest + ext |
| | | } |
| | | } |
| | | }) |