Browse Source

Tweak docs and add changelog

pull/257/head
Fredrik Ekre 1 year ago
parent
commit
0cf3e16955
No known key found for this signature in database
GPG Key ID: DE82E6D5E364C0A2
  1. 8
      CHANGELOG.md
  2. 7
      src/Literate.jl

8
CHANGELOG.md

@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Added
- A new keyword argument configuration `continue_on_error::Bool = false` has been added
which controls the behavior of code execution errors. By default (`continue_on_error =
false`) execution errors are re-thrown by Literate (as before). If `continue_on_error =
true` is set the error is used as the block result and execution continues with following
blocks. ([#201], [#257])
## [v2.19.1] - 2024-09-13 ## [v2.19.1] - 2024-09-13
### Fixed ### Fixed
- Set `:SOURCE_PATH` in the task local storage to the output file when executing code so - Set `:SOURCE_PATH` in the task local storage to the output file when executing code so

7
src/Literate.jl

@ -434,9 +434,10 @@ Available options:
output script. Only applicable for `Literate.script`. output script. Only applicable for `Literate.script`.
- `execute` (default: `true` for notebook, `false` for markdown): Whether to execute and - `execute` (default: `true` for notebook, `false` for markdown): Whether to execute and
capture the output. Only applicable for `Literate.notebook` and `Literate.markdown`. capture the output. Only applicable for `Literate.notebook` and `Literate.markdown`.
- `continue_on_error` (default: `false`): Whether to capture and display error messages. If - `continue_on_error` (default: `false`): Whether to continue code execution of remaining
`true`, blocks that error will display the error message. If `false`, errors will be blocks after encountering an error. By default execution errors are re-thrown. If
(re)thrown as is. Ignored when `execute == false`. `continue_on_error = true` the error will be used as the output of the block instead and
execution will continue. This option is only applicable when `execute = true`.
- `codefence` (default: `````"````@example \$(name)" => "````"````` for `DocumenterFlavor()` - `codefence` (default: `````"````@example \$(name)" => "````"````` for `DocumenterFlavor()`
and `````"````julia" => "````"````` otherwise): Pair containing opening and closing and `````"````julia" => "````"````` otherwise): Pair containing opening and closing
code fence for wrapping code blocks. code fence for wrapping code blocks.

Loading…
Cancel
Save