Use 3rd-level headings

For some reason, 2nd-level headings are used for introductions and for
each API endpoint, but then it immediately jumps to 4th-level
headings.

Instead, promote everything that's 4th-level to 3rd-level.
This commit is contained in:
Ivan Lazar Miljenovic 2017-10-11 10:48:22 +11:00
parent f960d97256
commit 9d10fe13dd

View file

@ -619,7 +619,7 @@ markdownWith RenderingOptions{..} api = unlines $
noteStr :: DocNote -> [String] noteStr :: DocNote -> [String]
noteStr nt = noteStr nt =
("#### " ++ nt ^. noteTitle) : ("### " ++ nt ^. noteTitle) :
"" : "" :
intersperse "" (nt ^. noteBody) ++ intersperse "" (nt ^. noteBody) ++
"" : "" :
@ -631,7 +631,7 @@ markdownWith RenderingOptions{..} api = unlines $
authStr auths = authStr auths =
let authIntros = mapped %~ view authIntro $ auths let authIntros = mapped %~ view authIntro $ auths
clientInfos = mapped %~ view authDataRequired $ auths clientInfos = mapped %~ view authDataRequired $ auths
in "#### Authentication": in "### Authentication":
"": "":
unlines authIntros : unlines authIntros :
"": "":
@ -643,7 +643,7 @@ markdownWith RenderingOptions{..} api = unlines $
capturesStr :: [DocCapture] -> [String] capturesStr :: [DocCapture] -> [String]
capturesStr [] = [] capturesStr [] = []
capturesStr l = capturesStr l =
"#### Captures:" : "### Captures:" :
"" : "" :
map captureStr l ++ map captureStr l ++
"" : "" :
@ -655,7 +655,7 @@ markdownWith RenderingOptions{..} api = unlines $
headersStr :: [Text] -> [String] headersStr :: [Text] -> [String]
headersStr [] = [] headersStr [] = []
headersStr l = headersStr l =
"#### Headers:" : "### Headers:" :
"" : "" :
map headerStr l ++ map headerStr l ++
"" : "" :
@ -667,7 +667,7 @@ markdownWith RenderingOptions{..} api = unlines $
paramsStr :: HTTP.Method -> [DocQueryParam] -> [String] paramsStr :: HTTP.Method -> [DocQueryParam] -> [String]
paramsStr _ [] = [] paramsStr _ [] = []
paramsStr m l = paramsStr m l =
("#### " ++ cs m ++ " Parameters:") : ("### " ++ cs m ++ " Parameters:") :
"" : "" :
map (paramStr m) l ++ map (paramStr m) l ++
"" : "" :
@ -693,7 +693,7 @@ markdownWith RenderingOptions{..} api = unlines $
rqbodyStr :: [M.MediaType] -> [(Text, M.MediaType, ByteString)]-> [String] rqbodyStr :: [M.MediaType] -> [(Text, M.MediaType, ByteString)]-> [String]
rqbodyStr [] [] = [] rqbodyStr [] [] = []
rqbodyStr types s = rqbodyStr types s =
["#### Request:", ""] ["### Request:", ""]
<> formatTypes types <> formatTypes types
<> formatBodies _requestExamples s <> formatBodies _requestExamples s
@ -749,7 +749,7 @@ markdownWith RenderingOptions{..} api = unlines $
responseStr :: Response -> [String] responseStr :: Response -> [String]
responseStr resp = responseStr resp =
"#### Response:" : "### Response:" :
"" : "" :
("- Status code " ++ show (resp ^. respStatus)) : ("- Status code " ++ show (resp ^. respStatus)) :
("- Headers: " ++ show (resp ^. respHeaders)) : ("- Headers: " ++ show (resp ^. respHeaders)) :