Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Explained better the regex that parser the pkgbuild

  • Loading branch information...
commit f0aaf739642c10cf3176683df6ea695cc31db1ff 1 parent 1e782a1
Daniel Șuteu authored

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 trizen
8 trizen
@@ -613,8 +613,12 @@ sub parse_pkgbuild ($) {
613 613 (\w+) # capturing word key (e.g.: pkgname)
614 614 \h*=\h* # =
615 615 ( # capturing value
616   - \(.*?\) # multi line values (e.g.: ('value1' \n 'value2'))
617   - (?=\s*(?:\#(?-s:.*))?\n) # followed by an optional comment and a newline (e.g.: ('te)st') # comm)
  616 + \(.*?\) # multi line values (e.g.: ('value1' \n 'value2'))
  617 + (?= # start of look-ahead
  618 + \s* # there may be some space
  619 + (?:\#(?-s:.*))? # and an optional comment
  620 + (?:\n|\z) # and a newline or end of the string (e.g.: ('te)st') # comm)
  621 + ) # end of look-ahead
618 622 | # OR
619 623 (?-s:.*) # a single value (e.g.: 'value')
620 624 ) # end of capture

0 comments on commit f0aaf73

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