Skip to content

Commit

Permalink
Merge pull request #2 from knz/20220908-unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
knz authored Sep 7, 2022
2 parents fb8cd90 + c31cf16 commit b0d22f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func (bordertype) parse(input []byte, first int) (pos int, val reflect.Value, er
// "\xFF" - a hex-encoded ascii value
// "\u1234" - a hex-encoded rune
// "\U12345678" - a hex-encoded rune
var reBorderStr = `"(?:\\[\\"]|\\[0-7]{3}|\\x[0-9a-fA-F]{2}|\\u[0-9]{4}|\\U[0-9]{8}|[^\\"])*"`
var reBorderStr = `"(?:\\[\\"]|\\[0-7]{3}|\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|[^\\"])*"`

var reBorder = regexp.MustCompile(`^\s*(?:border\s*\(\s*(` +
reBorderStr + `)\s*,\s*(` +
Expand Down
4 changes: 2 additions & 2 deletions convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ margin-top: 10;`, ``},
`border-style: border("a","b","c","d","e","f","g","h")`,
`border-style: border("a","b","c","d","e","f","g","h");`, ``},
{emptyStyle,
`border-style: border("\"","\x41","\102","\u0041","\U00000041","abc","a\"b","\\")`,
`border-style: border("\"","A","B","A","A","abc","a\"b","\\");`, ``},
`border-style: border("\"","\x41","\102","\u004a","\U0000004a","abc","a\"b","\\")`,
`border-style: border("\"","A","B","J","J","abc","a\"b","\\");`, ``},
{emptyStyle,
`border: border("a","b","c","d","e","f","g","h") true false`,
`border-bottom: true;
Expand Down

0 comments on commit b0d22f7

Please sign in to comment.