This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# minib (a mini nimib) | |
import strformat, macros | |
import tempfile | |
proc dup*(oldfd: FileHandle): FileHandle {.importc, header: "unistd.h".} | |
proc dup2*(oldfd: FileHandle, newfd: FileHandle): cint {.importc, header: "unistd.h".} | |
macro toStr*(body: untyped): string = | |
(body.toStrLit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import markdown | |
import std / strutils | |
echo markdown(""" | |
```nim | |
echo "hello" | |
```* | |
""".replace('*', ' '), config=initGfmConfig()) | |
#[ | |
<pre><code class="language-nim">echo "hello" |
OlderNewer