| 1 |
# Contributing |
| 2 |
|
| 3 |
The fancy-regex project is committed to fostering and preserving a |
| 4 |
diverse, welcoming community; all participants are expected to |
| 5 |
follow the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). |
| 6 |
|
| 7 |
Patching processes for this project are somewhat informal, as it's |
| 8 |
maintained by a small group. No Contributor License Agreement is needed. |
| 9 |
|
| 10 |
If this is your first substantive pull request in this repo, feel free |
| 11 |
to add yourself to the AUTHORS file. |
| 12 |
|
| 13 |
Make sure to run `cargo test` and `cargo fmt` to make sure your changes |
| 14 |
pass the tests and are formatted as expected. |
| 15 |
|
| 16 |
When adding support for new syntax (i.e. for better compatibility with |
| 17 |
oniguruma syntax), remember to update the "Syntax" section of the |
| 18 |
documentation - `docs/syntax.md`. |
| 19 |
|
| 20 |
When adding new feature flags, remember to update `docs/features.md` so |
| 21 |
that users can discover and understand the feature more easily. |
| 22 |
|
| 23 |
## Manual testing |
| 24 |
|
| 25 |
Sometimes it's useful to manually check how regexes are matched, e.g. |
| 26 |
to compare to other engines. |
| 27 |
|
| 28 |
### fancy-regex |
| 29 |
|
| 30 |
The toy example is useful for playing around with different regexes: |
| 31 |
|
| 32 |
cargo run --example toy run '[a-z]' 'input text' |
| 33 |
|
| 34 |
As is the web based playground: |
| 35 |
|
| 36 |
cd playground && ./build.sh && ./serve.sh |
| 37 |
|
| 38 |
### Oniguruma |
| 39 |
|
| 40 |
Set up rust-onig which is based on Oniguruma: |
| 41 |
|
| 42 |
git clone --recurse-submodules https://github.com/rust-onig/rust-onig |
| 43 |
|
| 44 |
Then match some text: |
| 45 |
|
| 46 |
echo 'input text' | cargo run --example capturedump -- '[a-z]' |