Skip to content

Commit

Permalink
allow passing a string to function directly; add tests; alpha release
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jul 2, 2020
1 parent 5870c02 commit f9f920d
Show file tree
Hide file tree
Showing 5 changed files with 404 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Try with `(def a (add 1 2))` or `{"json": [1, 2]}`.
[![Clojars Project](https://img.shields.io/clojars/v/mvc-works/lilac-parser.svg)](https://clojars.org/mvc-works/lilac-parser)

```edn
[mvc-works/lilac-parser "0.0.3-a4"]
[mvc-works/lilac-parser "0.0.3-a5"]
```

```clojure
Expand Down Expand Up @@ -157,7 +157,7 @@ Parser rules can be expected by injecting functions. It could be quite tricky an
A function is also provided for replacing text pieces matching a given rule:

```clojure
(replace-lilac (string/split content "") rule (fn [x] (str "<<<" x ">>>>")))
(replace-lilac content rule (fn [x] (str "<<<" x ">>>>")))
```

which returns `:result` as well as parsing details in `:attempts`:
Expand All @@ -176,7 +176,7 @@ This is an experimental API serving jobs as a custom regular expression replacer
Similarly matched pieces can be collected with `find-lilac`:

```clojure
(find-lilac (string/split content "") rule)
(find-lilac content rule)
```

### Workflow
Expand Down
Loading

0 comments on commit f9f920d

Please sign in to comment.