summaryrefslogtreecommitdiffstats
path: root/markup/highlight/highlight.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/highlight/highlight.go')
-rw-r--r--markup/highlight/highlight.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/markup/highlight/highlight.go b/markup/highlight/highlight.go
index 010c941f7..b74997700 100644
--- a/markup/highlight/highlight.go
+++ b/markup/highlight/highlight.go
@@ -157,10 +157,12 @@ type HightlightResult struct {
highlighted template.HTML
}
+// Wrapped returns the highlighted code wrapped in a <div>, <pre> and <code> tag.
func (h HightlightResult) Wrapped() template.HTML {
return h.highlighted
}
+// Inner returns the highlighted code without the wrapping <div>, <pre> and <code> tag, suitable for inline use.
func (h HightlightResult) Inner() template.HTML {
return h.highlighted[h.innerLow:h.innerHigh]
}