Fix test code
This commit is contained in:
parent
0a5dc97b56
commit
cb699c7acd
2 changed files with 6 additions and 4 deletions
|
|
@ -9,12 +9,12 @@ for filePath in walkFiles(markdownFilesGlob):
|
|||
let fileContents = file.readAll()
|
||||
file.close()
|
||||
|
||||
let sourceSegments = fileContents.findAll(re"""\n(?i)```\s*nim[\s\S]*?```""")
|
||||
let sourceSegments = fileContents.findAll(re"""\n(?i)```\s*nimrod[\s\S]*?```""")
|
||||
|
||||
for match in sourceSegments:
|
||||
echo filePath
|
||||
|
||||
let code = match.replacef(re"""\n(?i)```\s*nim[ \t]*\s([\s\S]*?)```""", "$1")
|
||||
let code = match.replacef(re"""\n(?i)```\s*nimrod[ \t]*\s([\s\S]*?)```""", "$1")
|
||||
let codeHash = code.getMD5()
|
||||
if not configFilePath.readFile().contains(codeHash): # Hasn't been verified yet
|
||||
let tempCodePath = getTempDir() / "code.nim"
|
||||
|
|
@ -39,4 +39,4 @@ for filePath in walkFiles(markdownFilesGlob):
|
|||
of "n":
|
||||
discard
|
||||
|
||||
echo "===================="
|
||||
echo "===================="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue