Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Explained better the regex that parser the pkgbuild

  • Loading branch information...
commit f0aaf739642c10cf3176683df6ea695cc31db1ff 1 parent 1e782a1
@trizen authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 trizen
View
8 trizen
@@ -613,8 +613,12 @@ sub parse_pkgbuild ($) {
(\w+) # capturing word key (e.g.: pkgname)
\h*=\h* # =
( # capturing value
- \(.*?\) # multi line values (e.g.: ('value1' \n 'value2'))
- (?=\s*(?:\#(?-s:.*))?\n) # followed by an optional comment and a newline (e.g.: ('te)st') # comm)
+ \(.*?\) # multi line values (e.g.: ('value1' \n 'value2'))
+ (?= # start of look-ahead
+ \s* # there may be some space
+ (?:\#(?-s:.*))? # and an optional comment
+ (?:\n|\z) # and a newline or end of the string (e.g.: ('te)st') # comm)
+ ) # end of look-ahead
| # OR
(?-s:.*) # a single value (e.g.: 'value')
) # end of capture

0 comments on commit f0aaf73

Please sign in to comment.
Something went wrong with that request. Please try again.