let runnableExamples start in a new paragraph (#8355)

fixes #8121, fixes #8346
This commit is contained in:
skilchen 2018-07-18 07:51:39 +02:00 • committed by Andreas Rumpf
commit 2262c255e2

View file

@ -288,7 +288,7 @@ proc getAllRunnableExamples(d: PDoc; n: PNode; dest: var Rope) =
of nkCallKinds: of nkCallKinds:
if n[0].kind == nkSym and n[0].sym.magic == mRunnableExamples and if n[0].kind == nkSym and n[0].sym.magic == mRunnableExamples and
n.len >= 2 and n.lastSon.kind == nkStmtList: n.len >= 2 and n.lastSon.kind == nkStmtList:
dispA(d.conf, dest, "\n<strong class=\"examples_text\">$1</strong>\n", dispA(d.conf, dest, "\n<p><strong class=\"examples_text\">$1</strong></p>\n",
"\n\\textbf{$1}\n", [rope"Examples:"]) "\n\\textbf{$1}\n", [rope"Examples:"])
inc d.listingCounter inc d.listingCounter
let id = $d.listingCounter let id = $d.listingCounter