mikkeloscar / gopkgbuild

A golang package for parsing Arch Linux PKGBUILDs
GNU General Public License v3.0
22 stars 5 forks source link

Fix srcinfo failing to parse when starting with \n #6

Closed Morganamilo closed 6 years ago

Morganamilo commented 6 years ago

When a srcinfo starts with a \n it ends up getting pulled into the next variable so the parser treats it as: "pkgbase = \nbiicode" which then causes a failiure because it's an invalid pkgbase.

Make sure to clear the buffer on \n as well as \n\n.

mikkeloscar commented 6 years ago

Thanks