packages feed

bibtex 0.0.5 → 0.0.6

raw patch · 4 files changed

+26/−13 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

bibtex.cabal view
@@ -1,5 +1,5 @@ Name:             bibtex-Version:          0.0.5+Version:          0.0.6 License:          BSD3 License-File:     LICENSE Author:           Henning Thielemann <haskell@henning-thielemann.de>@@ -74,7 +74,7 @@ Source-Repository this   type:     darcs   location: http://code.haskell.org/~thielema/bibtex/-  tag:      0.0.5+  tag:      0.0.6  Flag base2   description: Choose the new smaller, split-up base package.
src/Publications.hs view
@@ -19,6 +19,7 @@    (("techreport", Nothing), "techreport") :    (("inbook", Just "program"), "program") :    (("misc", Just "program"), "program") :+   (("misc", Just "talk"), "talk") :    (("mastersthesis", Nothing), "thesis") :    (("phdthesis", Nothing), "thesis") :    []@@ -26,8 +27,9 @@  cite :: Entry.T -> String cite entry =-   "\\nocite" ++-   fromMaybe ""+   maybe+      "% \\nocite"+      ("\\nocite" ++ )       (lookup           (map Char.toLower (Entry.entryType entry),            lookup "subtype" (Entry.fields (Entry.lowerCaseFieldNames entry)))
src/Text/BibTeX/Parse.hs view
@@ -7,6 +7,7 @@ import qualified Data.Char as Char  import Control.Monad (liftM, liftM2, liftM3, )+-- import Control.Applicative ((<*), )  import Data.Maybe (catMaybes, ) import Data.List.HT (chop, )@@ -28,7 +29,11 @@ file =    fmap catMaybes $    Parsec.many-      (skippingSpace (fmap Just entry <|> fmap (const Nothing) comment))+      (skippingSpace+--         ((fmap Just entry <* Parsec.optional (Parsec.char ',')))+         ((do e <- entry; Parsec.optional (Parsec.char ','); return (Just e))+          <|>+          fmap (const Nothing) comment))  {- | Parse a line that starts with a hash like@@ -48,7 +53,8 @@ > @article{author2010title, >   author = {Firstname Surname}, >   title = {Title},->   year = {2010},+>   year = 2010,+>   month = jul, > }  .@@ -79,8 +85,12 @@       return (field, trim val)  {- |-Parse an assignment like+Parse a value like +> jul++or+ > 2010  or@@ -95,7 +105,8 @@ -} value :: Parser String value =-   Parsec.many1 Parsec.digit <|>+   Parsec.many1 Parsec.letter <|> -- for fields like: month = jul+   Parsec.many1 Parsec.digit <|>  -- for fields like: year = 2010    Parsec.between (Parsec.char '{') (Parsec.char '}') (texSequence '}') <|>    Parsec.between (Parsec.char '"') (Parsec.char '"') (texSequence '"') @@ -118,7 +129,7 @@       (Parsec.char '{') (texSequence '}') (Parsec.char '}') <|>    sequence       [Parsec.char '\\',-       Parsec.oneOf "{}'`^&%\".,~# " <|> Parsec.letter] <|>+       Parsec.oneOf "_{}'`^&%\".,~# " <|> Parsec.letter] <|>    fmap (:[]) (Parsec.noneOf [closeChar])  {- |@@ -136,8 +147,8 @@ bibIdentifier :: Parser String bibIdentifier =    liftM2 (:)-      Parsec.letter-      (Parsec.many (Parsec.alphaNum <|> Parsec.oneOf ":-_."))+      (Parsec.letter <|> Parsec.char '_')+      (Parsec.many (Parsec.alphaNum <|> Parsec.oneOf "&;:-_.?+/"))  {- | Extends a parser, such that all trailing spaces are skipped.
tex/publications.bib view
@@ -5,7 +5,7 @@   subtype =	 {reviewed},   year =	 2002,   month =	 {June},-}+},  @Article{thielemann2000foobar,   author =	 {Thielemann, Henning},@@ -18,7 +18,7 @@   volume =	 88,   number =	 7, }-+, @TechReport{thielemann2000prefoobar,   author =	 {Thielemann, Henning},   title =	 {Before Foo becomes Bar},