packages feed

typescript-docs 0.0.2 → 0.0.3

raw patch · 3 files changed

+11/−9 lines, 3 filesdep ~language-typescript

Dependency ranges changed: language-typescript

Files

src/Language/TypeScript/Docs/Comments.hs view
@@ -68,12 +68,12 @@       let         (key, value) = break (== ' ') rest       in-        (comment { other = (key, dropWhile isSpace value):other comment}, True)+        (comment { commentOther = (key, dropWhile isSpace value):commentOther comment}, True)     go line (comment, _) | all isSpace line = (comment, True)     go line (comment, True) =-      (comment { text = line:text comment }, False)-    go line (comment@Comment{ text = init:tail }, False) =-      (comment { text = (line ++ " " ++ init):tail }, False)+      (comment { commentText = line:commentText comment }, False)+    go line (comment@Comment{ commentText = init:tail }, False) =+      (comment { commentText = (line ++ " " ++ init):tail }, False)  appendComments :: String -> [DeclarationElement] -> [DeclarationElement] appendComments source = everywhere (mkT appendComments')
src/Language/TypeScript/Docs/Html.hs view
@@ -75,9 +75,9 @@ renderComment :: CommentPlaceholder -> H.Html renderComment (Left _) = mempty renderComment (Right comments) = do-  flip mapM_ (text comments) $ \line ->+  flip mapM_ (commentText comments) $ \line ->     H.p ! A.class_ "comments" $ H.toHtml line-  let groups = groupBy ((==) `on` fst) (other comments)+  let groups = groupBy ((==) `on` fst) (commentOther comments)   flip mapM_ groups $ \all@((key,_):_) -> do     H.p $ H.strong $ H.toHtml key     H.ul $ mapM_ (H.li . renderCommentKeyValuePair) all@@ -377,8 +377,10 @@   . mapMaybe p   where   p (e, AmbientModuleDeclaration com names ambs, com1) = Just (e, intercalate "." names, ambs, com <.> com1)-  p (e, AmbientExternalModuleDeclaration com name ambs, com1) = Just (e, name, ambs, com <.> com1)+  p (e, AmbientExternalModuleDeclaration com name ambs, com1) = Just (e, name, mapMaybe q ambs, com <.> com1)   p _ = Nothing+  q (AmbientModuleElement a) = Just a+  q _ = Nothing   collect = foldl1 (\(e1, name, els1, com1) (e2, _, els2, com2) -> (e1 `mplus` e2, name, els1 ++ els2, com1 <..> Just com2))  renderAmbientModuleDeclaration :: [String] -> Int -> (Maybe Exported, String, [Ambient], Maybe CommentPlaceholder) -> H.Html
typescript-docs.cabal view
@@ -1,5 +1,5 @@ name: typescript-docs-version: 0.0.2+version: 0.0.3 cabal-version: >=1.4 build-type: Simple license: MIT@@ -17,7 +17,7 @@ executable typescript-docs     build-depends: utf8-string -any, syb -any, split -any,                    filepath -any, filemanip -any, cmdtheline -any, containers -any,-                   blaze-html -any, parsec -any, base >= 3 && <= 5, language-typescript -any+                   blaze-html -any, parsec -any, base >= 3 && <= 5, language-typescript >= 0.0.3     main-is: Main.hs     buildable: True     hs-source-dirs: src