diff --git a/CHANGELOG.md b/CHANGELOG.md index a2424f3..26dd065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### Added -- A new optional PrintBox-only setting `highlight_terms`, which applies a highlight style on paths to leaves matching a regular expression. +- A new optional PrintBox-only setting `highlight_terms`, which applies a frame / border on paths to leaves matching a regular expression. ## [0.6.2] -- 2023-12-21 diff --git a/README.md b/README.md index 812cbe7..48554cb 100644 --- a/README.md +++ b/README.md @@ -139,14 +139,14 @@ Here we also convert the logged `sexp` values (with at least 50 atoms) to trees. The `PrintBox` runtime also supports highlighting paths to logs that match a `highlight_terms` regular expression. For example: -![PrintBox runtime with collapsible/foldable trees](docs/ppx_minidebug-html_highlights.png) +![PrintBox runtime with collapsible/foldable trees](docs/ppx_minidebug-highlight_term_169.png) #### `PrintBox` creating helpers with defaults: `debug` and `debug_html` -The above configuration is more concisely just: +The configuration for the above example is more concisely just: ```ocaml -module Debug_runtime = (val Minidebug_runtime.debug_html "debug.html") +module Debug_runtime = (val Minidebug_runtime.debug_html ~highlight_terms:(Re.str "169") "debug.html") ``` Similarly, `debug` returns a `PrintBox` module, which by default logs to `stdout`: diff --git a/docs/ppx_minidebug-highlight_term_169.png b/docs/ppx_minidebug-highlight_term_169.png new file mode 100644 index 0000000..cdf1159 Binary files /dev/null and b/docs/ppx_minidebug-highlight_term_169.png differ diff --git a/dune-project b/dune-project index 2a2da55..e8d2bae 100644 --- a/dune-project +++ b/dune-project @@ -15,7 +15,7 @@ (documentation https://lukstafi.github.io/ppx_minidebug/ppx_minidebug) -(version 0.6.2) +(version 0.7.0) (package (name ppx_minidebug) diff --git a/index.mld b/index.mld index df0ffad..cd2a84b 100644 --- a/index.mld +++ b/index.mld @@ -81,7 +81,7 @@ The cutoff points are indicated in the logs. Currently (since 0.7.0) there is just one support mechanism for taming complex logs: a [highlight_terms] regular expression in the PrintBox runtime. Paths to logs that match [highlight_terms] are printed with -a highlight style. +a frame / border: around the log and summaries on the path. {2 VS Code suggestions} diff --git a/ppx_minidebug.opam b/ppx_minidebug.opam index 7aa7363..1d8a1d7 100644 --- a/ppx_minidebug.opam +++ b/ppx_minidebug.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.6.2" +version: "0.7.0" synopsis: "Debug logs for selected functions and let-bindings" description: "A poor man's `ppx_debug` with formatted logs of let-bound values, function arguments and results."