aboutsummaryrefslogtreecommitdiff
path: root/src/Formats
diff options
context:
space:
mode:
Diffstat (limited to 'src/Formats')
-rw-r--r--src/Formats/StructuredFormatService.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index efddd578..2eb298d8 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -57,7 +57,8 @@ public abstract class StructuredFormatService(locationService: LocationService,
is ContentListItem -> append(formatListItem(formatText(location, content.children)))
is ContentNodeLink -> {
- val linkTo = locationHref(location, content.node)
+ val node = content.node
+ val linkTo = if (node != null) locationHref(location, node) else "#"
val linkText = formatText(location, content.children)
append(formatLink(linkText, linkTo))
}