aboutsummaryrefslogtreecommitdiff
path: root/src/Formats/StructuredFormatService.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Formats/StructuredFormatService.kt')
-rw-r--r--src/Formats/StructuredFormatService.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index b974dcf8..df11b835 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -25,6 +25,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi
public abstract fun formatKeyword(text: String): String
public abstract fun formatIdentifier(text: String): String
public abstract fun formatLink(text: String, location: Location): String
+ public abstract fun formatLink(text: String, href: String): String
public open fun formatLink(link: FormatLink): String = formatLink(formatText(link.text), link.location)
public abstract fun formatBold(text: String): String
public abstract fun formatCode(code: String): String
@@ -47,6 +48,10 @@ public abstract class StructuredFormatService(val locationService: LocationServi
val linkText = formatText(location, content.children)
append(formatLink(linkText, linkTo))
}
+ is ContentExternalLink -> {
+ val linkText = formatText(location, content.children)
+ append(formatLink(linkText, content.href))
+ }
else -> append(formatText(location, content.children))
}
}.toString()