Skip to content

v0.2.4 - nbCodeAsInSource

Choose a tag to compare

@pietroppeter pietroppeter released this 27 Nov 19:35
· 80 commits to main since this release
20824e4

What's Changed

-d:nimibPreviewCodeAsInSource

Using -d:nimibPreviewCodeAsInSource Nimib will read the source file directly and get the code from it instead of letting the Nim compiler render a cleaned-up version of the code. This means formatting and ordinary comments (#) will be preserved (no more secrets!). There are some limitations though. It isn't 100% accurate yet so if you find that it doesn't show the code you expected, please open an issue. The known issues right now are:

  • It doesn't work if the nbCode isn't first on the line. For example this doesn't work:
# This doesn't work!
block: nbCode: 
	echo "Hello World"

# This does work!
block:
	nbCode:
		echo "Hello World"
  • If the last expression of the code block is a multiline expression, there might be edge-cases we haven't accounted for yet. But it should mostly work.

Full Changelog: v0.2.3...v0.2.4