summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-08 15:08:55 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-08 15:08:55 +0200
commitabf1951ff0e26b5e018e8c87158060b02053fddb (patch)
tree05fbbec7636132d921a70e4f38b0b573f89a6a5e /compiler
parent019ee2260c82681ba5d1b475c6f6f702668e90d0 (diff)
downloadNim-abf1951ff0e26b5e018e8c87158060b02053fddb.tar.gz
docgen: hide pragmas
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index d954b897b..fab759848 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -380,8 +380,16 @@ proc genItem(d: PDoc, n, nameNode: PNode, k: TSymKind) =
             "\\spanIdentifier{$1}", [rope(esc(d.target, literal))])
     of tkSpaces, tkInvalid:
       add(result, literal)
+    of tkCurlyDotLe:
+      dispA(result, """<span class="Other pragmabegin">$1</span><div class="pragma">""",
+                    "\\spanOther{$1}",
+                  [rope(esc(d.target, literal))])
+    of tkCurlyDotRi:
+      dispA(result, "</div><span class=\"Other pragmaend\">$1</span>",
+                    "\\spanOther{$1}",
+                  [rope(esc(d.target, literal))])
     of tkParLe, tkParRi, tkBracketLe, tkBracketRi, tkCurlyLe, tkCurlyRi,
-       tkBracketDotLe, tkBracketDotRi, tkCurlyDotLe, tkCurlyDotRi, tkParDotLe,
+       tkBracketDotLe, tkBracketDotRi, tkParDotLe,
        tkParDotRi, tkComma, tkSemiColon, tkColon, tkEquals, tkDot, tkDotDot,
        tkAccent, tkColonColon,
        tkGStrLit, tkGTripleStrLit, tkInfixOpr, tkPrefixOpr, tkPostfixOpr: