diff options
author | simonmar <unknown> | 2005-06-27 14:46:40 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-06-27 14:46:40 +0000 |
commit | abfd98262dc5b9c2b0e2c9a85fb828854e0afecd (patch) | |
tree | e8cb22f5be64756a29c751ad100faa4ab814f9fe /src | |
parent | 3b953f8b9f2fa01b550e2b2d05ce962b1ff07685 (diff) |
[haddock @ 2005-06-27 14:46:40 by simonmar]
name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The
old way confused Apache because the extensions are sometimes
interpreted as having special meanings.
Diffstat (limited to 'src')
-rw-r--r-- | src/HaddockUtil.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/HaddockUtil.hs b/src/HaddockUtil.hs index ef02596f..96dc7a0b 100644 --- a/src/HaddockUtil.hs +++ b/src/HaddockUtil.hs @@ -385,8 +385,10 @@ isPathSeparator ch = moduleHtmlFile :: String -> FilePath moduleHtmlFile mdl = case Map.lookup (Module mdl) html_xrefs of - Nothing -> mdl ++ ".html" - Just fp0 -> pathJoin [fp0, mdl ++ ".html"] + Nothing -> mdl' ++ ".html" + Just fp0 -> pathJoin [fp0, mdl' ++ ".html"] + where + mdl' = map (\c -> if c == '.' then '-' else c) mdl nameHtmlRef :: String -> HsName -> String nameHtmlRef mdl str = moduleHtmlFile mdl ++ '#':escapeStr (hsAnchorNameStr str) |