about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--adapter/format/md2html.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/adapter/format/md2html.nim b/adapter/format/md2html.nim
index 4c3fcaa3..5d06acc5 100644
--- a/adapter/format/md2html.nim
+++ b/adapter/format/md2html.nim
@@ -209,7 +209,8 @@ proc parseHash(line: openArray[char]): bool =
       break
   H = max(L - 1, H)
   let id = line.toOpenArray(L, H).getId()
-  stdout.write("<H" & $n & " id='" & id & "'>")
+  stdout.write("<H" & $n & " id='" & id & "'><A HREF='#" & id & "'>" &
+    '#'.repeat(n) & "</A> ")
   line.toOpenArray(L, H).parseInline()
   stdout.write("</H" & $n & ">\n")
   return true