summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hs/src/Html.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/hs/src/Html.hs b/hs/src/Html.hs
index 659db49..2decb24 100644
--- a/hs/src/Html.hs
+++ b/hs/src/Html.hs
@@ -10,14 +10,15 @@ module Html
import System.FilePath
( joinPath
- , takeDirectory
- , (</>)
, (-<.>)
, (<.>)
- , hasExtension
+ , (</>)
, dropExtension
- , takeBaseName
+ , hasExtension
+ , hasTrailingPathSeparator
, isRelative
+ , takeBaseName
+ , takeDirectory
)
import Control.Lens (_2)
import Control.Lens.Operators hiding ((<.>))
@@ -116,6 +117,7 @@ urlRewrites conf = M.fromList $ mapMaybe sequence
fixExtension url
| hasExtension url = url
+ | hasTrailingPathSeparator url = url
| otherwise = url <.> "html"