diff options
Diffstat (limited to 'src/Formats/StructuredFormatService.kt')
-rw-r--r-- | src/Formats/StructuredFormatService.kt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt index 70b2a3c1..dd23b7b3 100644 --- a/src/Formats/StructuredFormatService.kt +++ b/src/Formats/StructuredFormatService.kt @@ -61,11 +61,19 @@ public abstract class StructuredFormatService(locationService: LocationService, val node = content.node val linkTo = if (node != null) locationHref(location, node) else "#" val linkText = formatText(location, content.children) - append(formatLink(linkText, linkTo)) + if (linkTo == ".") { + append(linkText) + } else { + append(formatLink(linkText, linkTo)) + } } is ContentExternalLink -> { val linkText = formatText(location, content.children) - append(formatLink(linkText, content.href)) + if (content.href == ".") { + append(linkText) + } else { + append(formatLink(linkText, content.href)) + } } is ContentParagraph -> { appendParagraph(this, formatText(location, content.children)) |