Skip to content

Commit

Permalink
Merge pull request #15 from baywet/bugfix/single-quote
Browse files Browse the repository at this point in the history
fixes an issue where single quote would be considered invalid literal
  • Loading branch information
yosida95 authored Apr 19, 2022
2 parents fa7d6df + e02d37a commit c583dbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ var (
R16: []unicode.Range16{
{Lo: 0x0021, Hi: 0x0021, Stride: 1}, // '!'
{Lo: 0x0023, Hi: 0x0024, Stride: 1}, // '#' - '$'
{Lo: 0x0026, Hi: 0x0026, Stride: 1}, // '&'
{Lo: 0x0028, Hi: 0x003B, Stride: 1}, // '(' - ';'
{Lo: 0x0026, Hi: 0x003B, Stride: 1}, // '&' ''' '(' - ';'. '''/27 used to be excluded but an errata is in the review process https://www.rfc-editor.org/errata/eid6937
{Lo: 0x003D, Hi: 0x003D, Stride: 1}, // '='
{Lo: 0x003F, Hi: 0x005B, Stride: 1}, // '?' - '['
{Lo: 0x005D, Hi: 0x005D, Stride: 1}, // ']'
Expand Down
2 changes: 2 additions & 0 deletions uritemplate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ var (
}{
// below cases are quoted from the RFC
// http://tools.ietf.org/html/rfc6570
// § 2.1
{"'{count}'", "'one,two,three'", false},
// § 3.2.1
{"{count}", "one,two,three", false},
{"{count*}", "one,two,three", false},
Expand Down

0 comments on commit c583dbd

Please sign in to comment.