wai-app-static 3.0.1 → 3.0.1.1
raw patch · 3 files changed
+11/−3 lines, 3 files
Files
- ChangeLog.md +4/−0
- WaiAppStatic/Listing.hs +6/−2
- wai-app-static.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.0.1.1++* Fix root links+ ## 3.0.1 * Better HEAD support [#354](https://github.com/yesodweb/wai/issues/354)
WaiAppStatic/Listing.hs view
@@ -48,7 +48,7 @@ , "a { text-decoration: none }" ] H.body $ do- H.h1 $ showFolder $ filter (not . T.null . fromPiece) pieces+ H.h1 $ showFolder' $ filter (not . T.null . fromPiece) pieces renderDirectoryContentsTable haskellSrc folderSrc fps'' where image x = T.unpack $ T.concat [(relativeDirFromPieces pieces), ".hidden/", x, ".png"]@@ -57,8 +57,12 @@ showName "" = "root" showName x = x + -- Add a link to the root of the tree+ showFolder' :: Pieces -> H.Html+ showFolder' pieces = showFolder (unsafeToPiece "root" : pieces)+ showFolder :: Pieces -> H.Html- showFolder [] = "/"+ showFolder [] = "/" -- won't happen showFolder [x] = H.toHtml $ showName $ fromPiece x showFolder (x:xs) = do let href = concat $ replicate (length xs) "../" :: String
wai-app-static.cabal view
@@ -1,5 +1,5 @@ name: wai-app-static-version: 3.0.1+version: 3.0.1.1 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>