Skip to content

Commit

Permalink
add escaping support to inline rule arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBrewer317 committed Oct 11, 2024
1 parent 6875123 commit 19a0bef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [10.0.1] - 2024-10-11

### Added

- Inline rule arguments now can use `\` for escaping, including escaping `)` and `,`.

## [10.0.0] - 2024-09-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "arctic"
version = "10.0.0"
version = "10.0.1"

# Fill out these fields if you intend to generate HTML documentation or publish
# your project to the Hex package manager.
Expand Down
2 changes: 1 addition & 1 deletion src/arctic/parse.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ fn parse_inline_rule(
use args <- party.do(case res {
Ok(_) -> {
use args <- party.do(party.sep(
party.many_concat(party.satisfy(fn(c) { c != "," && c != ")" })),
party.many_concat(party.either(escaped_char(), party.satisfy(fn(c) { c != "," && c != ")" }))),
by: party.char(","),
))
use _ <- party.do(party.char(")"))
Expand Down

0 comments on commit 19a0bef

Please sign in to comment.