diff --git a/ChangeLog.md b/ChangeLog.md index e828093..3791923 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [0.1.3.20] - 2021-06-04 +### Changed +- YLAB2-629: Fasta parser is now able to parse empty lines in the beginning. + ## [0.1.3.19] - 2021-04-30 ### Changed - Exports and instances for Biosset. diff --git a/package.yaml b/package.yaml index c24ff92..a13c6a5 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: cobot-io -version: 0.1.3.19 +version: 0.1.3.20 github: "biocad/cobot-io" license: BSD3 category: Bio diff --git a/src/Bio/FASTA/Parser.hs b/src/Bio/FASTA/Parser.hs index 320a6a5..a5aa3a1 100644 --- a/src/Bio/FASTA/Parser.hs +++ b/src/Bio/FASTA/Parser.hs @@ -12,7 +12,7 @@ import Bio.FASTA.Type (Fasta, FastaItem (..), ModItem (..), Modification ( import Bio.Sequence (BareSequence, bareSequence) import Control.Applicative ((<|>)) import Data.Attoparsec.Text (Parser, char, choice, endOfInput, endOfLine, many', many1', satisfy, - skipWhile, string, takeWhile, try) + skipWhile, space, string, takeWhile, try) import Data.Char (isAlphaNum, isLetter, isSpace) import Data.Text (Text, strip) import Prelude hiding (takeWhile) @@ -27,7 +27,7 @@ instance ParsableFastaToken ModItem where -- | Parser of .fasta file. -- fastaP :: ParsableFastaToken a => Parser (Fasta a) -fastaP = fastaPGeneric isLetter +fastaP = many' space *> fastaPGeneric isLetter fastaPGeneric :: ParsableFastaToken a => (Char -> Bool) -> Parser (Fasta a) fastaPGeneric = many' . item