Skip to content

Commit

Permalink
Tweak highlighting doc, bump version to 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Dec 22, 2023
1 parent 794e9da commit f2da9b0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
Binary file added docs/ppx_minidebug-highlight_term_169.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion index.mld
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion ppx_minidebug.opam
Original file line number Diff line number Diff line change
@@ -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."
Expand Down

0 comments on commit f2da9b0

Please sign in to comment.