Skip to content

Commit

Permalink
refactored versioning information
Browse files Browse the repository at this point in the history
  • Loading branch information
timtylin committed Nov 4, 2014
1 parent f116809 commit aa2fcd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scholdoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,9 @@ options =
(\_ -> do
prg <- getProgName
defaultDatadir <- getAppUserDataDirectory "pandoc"
UTF8.hPutStrLn stdout (prg ++
pandocVersion ++ "-alpha, incorporating Pandoc 1.13.1" ++
compileInfo ++ "\nDefault user data directory: " ++
UTF8.hPutStrLn stdout (prg ++ " " ++
scholdocVersion ++ "-alpha (incorporating Pandoc " ++ pandocVersion
++ ")" ++ compileInfo ++ "\nDefault user data directory: " ++
defaultDatadir ++ copyrightMessage)
exitWith ExitSuccess ))
"" -- "Print version"
Expand Down
9 changes: 7 additions & 2 deletions src/Text/Pandoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module Text.Pandoc
-- * Rendering templates and default templates
, module Text.Pandoc.Templates
-- * Version
, scholdocVersion
, pandocVersion
-- * Miscellaneous
, getReader
Expand Down Expand Up @@ -123,9 +124,13 @@ import Text.Parsec.Error
import qualified Text.Pandoc.UTF8 as UTF8
import Paths_scholdoc (version)

-- | Version number of pandoc library.
-- | Version number of scholdoc library.
scholdocVersion :: String
scholdocVersion = showVersion version

-- | Version number of the incorporated pandoc library (change at merge)
pandocVersion :: String
pandocVersion = showVersion version
pandocVersion = "1.13.1"

parseFormatSpec :: String
-> Either ParseError (String, Set Extension -> Set Extension)
Expand Down
2 changes: 1 addition & 1 deletion tryscholdoc/tryscholdoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ app req respond = do
if fromFormat == "markdown_strict"
then T.pack "scholdoc (strict)"
else T.pack "scholdoc"
, T.pack "version" .= pandocVersion]
, T.pack "version" .= scholdocVersion]
respond $ responseLBS status200 [(hContentType,"text/json; charset=UTF-8")] output

checkLength :: Text -> IO Text
Expand Down

0 comments on commit aa2fcd3

Please sign in to comment.