Skip to content

Commit f4d021c

Browse files
committed
Use naturaldocs code sample style instead of markdown (duh)
1 parent 059fd94 commit f4d021c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/math.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CONSTANT Pi: Number := 3.141592653589793238462643383279503
2222
| http://mathworld.wolfram.com/AbsoluteValue.html
2323
|
2424
| Example:
25-
| ASSERT math.abs(-5) = 5
25+
| > ASSERT math.abs(-5) = 5
2626
|%
2727
DECLARE NATIVE FUNCTION abs(x: Number): Number
2828

scripts/test_doc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def check_file_neon(fn, source):
3636
doc = itertools.dropwhile(lambda x: "Example:" not in x, [x[1] for x in full])
3737
try:
3838
next(doc)
39-
test("IMPORT {}\n".format(os.path.basename(fn)[:-5]) + "\n".join(x[3:] for x in doc))
39+
test("IMPORT {}\n".format(os.path.basename(fn)[:-5]) + "\n".join(re.sub(r"^ \|\s*[>:|]", "", x) for x in doc if x.startswith(" | ")))
4040
except StopIteration:
4141
firstline = next(itertools.dropwhile(lambda x: not x[1][3:].strip(), full))
4242
undocumented.append("no example in {}:{} for {}".format(fn, firstline[0], firstline[1][3:].strip()))

0 commit comments

Comments
 (0)