Releases: jillesvangurp/kotlin4example
Releases · jillesvangurp/kotlin4example
fix github links
Small fix that changes the links to github to have the word blob instead of tree in them. On some repos it redirects old links but not on all.
reindentation bug fix
reindentation bug where it was not detecting indentation correctly if it matches the desired one
1.1.3
- implement more robust indentation for code blocks
v1.1.2
- minor refactoring
- add a DslMarker annotation
Deprecate suspendingExample
- Examples are now always suspending blocks. This simplifies the API further.
mdCodeBlock
is no longer private
API cleanup
This release cleans up the kotlin API a bit.
block
andsuspendingBlock
are deprecated. The replacements areexample
andsuspendingExample
. The ReplaceWith should do the right things mostly. However, it does not preserve the arrow and "Captured output" String.example
returns anExampleOutput
instance with aResult<T>
of whatever the block returns plus the captured stdout as a string
Add captureBlockReturnValue param
Add captureBlockReturnValue: Boolean = true to block and suspendingBlock so you can opt out of the return value being printed.
fix bug with suspendingBlock
Update the regular expression so it won't fail on suspendingBlocks
1.0 release
Decided to make this a 1.0 release as I seem to have most features that I need at this point.
There is only 1 change since the last version:
- added
suspendingBlock
so you can document co-routine logic as well without having to put a runBlocking in each block
Add a few small features
This version adds a few nice features:
- you can now define sections and sub sections
section("Section") { ... }
. The block is the parent Kotlin4Example instance so this works nicely for structuring things too. - fix a few issues with code snippets and support all the code block optional parameters
- allow loading markdown fragments so they can be kept in
.md
files. This seems nicer for larger bits of text.