md_eval.pl -- Provide evaluable markdown
This module adds evaluable sections to markdown cells in SWISH notebooks. Such cells are written as
```{eval} <Prolog code> ```
- eval_dom(+DOM0, -DOM, +Options) is semidet[private]
- This predicate post-processes the wiki DOM result if the DOM
contains at least one
eval
code fragment. The evaluation is executed in a sandboxed environment, much like the Pengines infrastructure.A code fragment is represented by a term of this shape:
pre([class(code), ext(Ext)], Text)
- md_eval(+Module, +Options, +DOM0, -DOM, +FragI0, -FragI1)[private]
- swish_provides(?Term) is nondet
- True when Term describes a provided feature of the current SWISH
instances. Provided Term values are:
- plugin(Name)
- True when Name is the name of a loaded plugin
In addition, plugins may provide additional terms by adding facts to swish_config:
config(provides, Term)
. - swish_has_plugin(+Name) is nondet[private]
- True when Name is the name of a loaded plugin. This predicate is intended for dynamic markdown pages.