diff --git a/AUTHORS.md b/AUTHORS.md
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -17,6 +17,7 @@
 - Anders Waldenborg
 - Andreas Lööw
 - Andrew Dunning
+- Andy Morris
 - Antoine Latter
 - Antonio Terceiro
 - Arata Mizuki
diff --git a/MANUAL.txt b/MANUAL.txt
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,7 +1,7 @@
 ---
 title: Pandoc User's Guide
 author: John MacFarlane
-date: November 3, 2020
+date: November 7, 2020
 ---
 
 # Synopsis
diff --git a/cabal.project b/cabal.project
--- a/cabal.project
+++ b/cabal.project
@@ -4,8 +4,8 @@
   flags: +embed_data_files -trypandoc
   ghc-options: -j +RTS -A64m -RTS
 
-source-repository-package
-    type: git
-    location: https://github.com/jgm/citeproc
-    tag: 1860f189e9995c1dc27a68893bedfbf8de1ee67f
+-- source-repository-package
+--     type: git
+--     location: https://github.com/jgm/citeproc
+--     tag: 0.1.1.1
 
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,37 @@
 # Revision history for pandoc
 
+## pandoc 2.11.1.1 (2020-11-07)
+
+  * Citeproc: improve punctuation in in-text note citations (#6813).
+    Previously in-text note citations inside a footnote would sometimes have
+    the final period stripped, even if it was needed (e.g. on the end of
+    'ibid').
+
+  * Use citeproc 0.1.1.1.  This improves the decision about when
+    to use `ibid` in cases where citations are used inside
+    a footnote (#6813).
+
+  * Support `nocase` spans for `csljson` output.
+
+  * Require latest commonmark, commonmark-extensions.
+    This fixes a bug with `autolink_bare_uris` and commonmark.
+
+  * LaTeX reader: better handling of `\\` inside math in table cells (#6811).
+
+  * DokuWiki writer:  translate language names for code elements
+    and improve whitespace (#6807).
+
+  * MediaWiki writer: use `syntaxhighlight` tag instead of deprecated
+    `source` for highlighted code (#6810).  Also support `startFrom`
+    attribute and `numberLines`.
+
+  * Lint code in PRs and when committing to master (#6790,
+    Albert Krewinkel).
+
+  * doc/filters.md: describe technical details of filter invocations (#6815,
+    Albert Krewinkel).
+
+
 ## pandoc 2.11.1 (2020-11-03)
 
   * DocBook Reader: fix duplicate bibliography bug (#6773, Nils Carlson).
diff --git a/man/pandoc.1 b/man/pandoc.1
--- a/man/pandoc.1
+++ b/man/pandoc.1
@@ -1,7 +1,7 @@
 '\" t
 .\" Automatically generated by Pandoc 2.11.1
 .\"
-.TH "Pandoc User\[cq]s Guide" "" "November 3, 2020" "pandoc 2.11.1" ""
+.TH "Pandoc User\[cq]s Guide" "" "November 7, 2020" "pandoc 2.11.1.1" ""
 .hy
 .SH NAME
 pandoc - general markup converter
diff --git a/pandoc.cabal b/pandoc.cabal
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -1,6 +1,6 @@
 cabal-version:   2.2
 name:            pandoc
-version:         2.11.1
+version:         2.11.1.1
 build-type:      Simple
 license:         GPL-2.0-or-later
 license-file:    COPYING.md
@@ -404,9 +404,9 @@
                  blaze-markup          >= 0.8      && < 0.9,
                  bytestring            >= 0.9      && < 0.12,
                  case-insensitive      >= 1.2      && < 1.3,
-                 citeproc              >= 0.1.0.3  && < 0.2,
-                 commonmark            >= 0.1.1    && < 0.2,
-                 commonmark-extensions >= 0.2.0.2  && < 0.3,
+                 citeproc              >= 0.1.1.1  && < 0.2,
+                 commonmark            >= 0.1.1.2  && < 0.2,
+                 commonmark-extensions >= 0.2.0.4  && < 0.3,
                  commonmark-pandoc     >= 0.2      && < 0.3,
                  connection            >= 0.3.1,
                  containers            >= 0.4.2.1  && < 0.7,
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs
--- a/src/Text/Pandoc/Citeproc.hs
+++ b/src/Text/Pandoc/Citeproc.hs
@@ -1,18 +1,14 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE ViewPatterns #-}
 {-# LANGUAGE StrictData #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE DeriveFunctor #-}
-{-# LANGUAGE DeriveFoldable #-}
-{-# LANGUAGE DeriveTraversable #-}
 module Text.Pandoc.Citeproc
   ( processCitations )
 where
 
-import Citeproc as Citeproc
+import Citeproc
 import Citeproc.Pandoc ()
 import Text.Pandoc.Citeproc.Locator (parseLocator)
 import Text.Pandoc.Citeproc.CslJson (cslJsonToReferences)
@@ -35,7 +31,7 @@
 import Data.Ord ()
 import qualified Data.Map as M
 import qualified Data.Set as Set
-import Data.Char (isPunctuation)
+import Data.Char (isPunctuation, isUpper)
 import Data.Text (Text)
 import qualified Data.Text as T
 import Control.Monad.State
@@ -106,8 +102,7 @@
   let citeIds = query getCiteId (Pandoc meta bs)
   let idpred = if "*" `Set.member` nocites
                   then const True
-                  else (\c -> c `Set.member` citeIds ||
-                              c `Set.member` nocites)
+                  else (`Set.member` citeIds)
   refs <- map (linkifyVariables . legacyDateRanges) <$>
           case lookupMeta "references" meta of
             Just (MetaList rs) -> return $ mapMaybe metaValueToReference rs
@@ -529,20 +524,27 @@
 deNote (Note bs:rest) =
   Note (walk go bs) : deNote rest
  where
-  go (Cite (c:cs) ils)
+  go [] = []
+  go (Cite (c:cs) ils : zs)
     | citationMode c == AuthorInText
-      = Cite cs (concatMap noteAfterComma ils)
+      = Cite cs (concatMap (noteAfterComma (needsPeriod zs)) ils) : go zs
     | otherwise
-      = Cite cs (concatMap noteInParens ils)
-  go x = x
+      = Cite cs (concatMap noteInParens ils) : go zs
+  go (x:xs) = x : go xs
+  needsPeriod [] = True
+  needsPeriod (Str t:_) = not (T.null t) && isUpper (T.head t)
+  needsPeriod (Space:zs) = needsPeriod zs
+  needsPeriod _ = False
   noteInParens (Note bs')
        = Space : Str "(" :
          removeFinalPeriod (blocksToInlines bs') ++ [Str ")"]
   noteInParens x = [x]
-  noteAfterComma (Note bs')
+  noteAfterComma needsPer (Note bs')
        = Str "," : Space :
-         removeFinalPeriod (blocksToInlines bs')
-  noteAfterComma x = [x]
+         (if needsPer
+             then id
+             else removeFinalPeriod) (blocksToInlines bs')
+  noteAfterComma _ x = [x]
 deNote (x:xs) = x : deNote xs
 
 -- Note: we can't use dropTextWhileEnd indiscriminately,
diff --git a/src/Text/Pandoc/Citeproc/MetaValue.hs b/src/Text/Pandoc/Citeproc/MetaValue.hs
--- a/src/Text/Pandoc/Citeproc/MetaValue.hs
+++ b/src/Text/Pandoc/Citeproc/MetaValue.hs
@@ -147,7 +147,7 @@
                   mapMaybe metaValueToDateParts xs
                 Just _ -> []
                 Nothing ->
-                  maybe [] (:[]) $ metaValueToDateParts (MetaMap m)
+                  maybeToList $ metaValueToDateParts (MetaMap m)
   circa = fromMaybe False $
             M.lookup "circa" m >>= metaValueToBool
   season = M.lookup "season" m >>= metaValueToInt
@@ -251,4 +251,3 @@
     "pmid"  -> "PMID"
     "url"   -> "URL"
     x       -> x
-
diff --git a/src/Text/Pandoc/Lua/Filter.hs b/src/Text/Pandoc/Lua/Filter.hs
--- a/src/Text/Pandoc/Lua/Filter.hs
+++ b/src/Text/Pandoc/Lua/Filter.hs
@@ -160,7 +160,7 @@
 mconcatMapM f = fmap mconcat . mapM f
 
 hasOneOf :: LuaFilter -> [String] -> Bool
-hasOneOf (LuaFilter fnMap) = any (\k -> Map.member k fnMap)
+hasOneOf (LuaFilter fnMap) = any (`Map.member` fnMap)
 
 contains :: LuaFilter -> String -> Bool
 contains (LuaFilter fnMap) = (`Map.member` fnMap)
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs
--- a/src/Text/Pandoc/Options.hs
+++ b/src/Text/Pandoc/Options.hs
@@ -314,6 +314,7 @@
 defaultKaTeXURL :: Text
 defaultKaTeXURL = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/"
 
+-- Update documentation in doc/filters.md if this is changed.
 $(deriveJSON defaultOptions ''ReaderOptions)
 
 $(deriveJSON defaultOptions{
@@ -337,6 +338,7 @@
 
 $(deriveJSON defaultOptions ''HTMLSlideVariant)
 
+-- Update documentation in doc/filters.md if this is changed.
 $(deriveJSON defaultOptions{ constructorTagModifier =
                                camelCaseStrToHyphenated
                            } ''TrackChanges)
diff --git a/src/Text/Pandoc/Readers/BibTeX.hs b/src/Text/Pandoc/Readers/BibTeX.hs
--- a/src/Text/Pandoc/Readers/BibTeX.hs
+++ b/src/Text/Pandoc/Readers/BibTeX.hs
@@ -26,7 +26,6 @@
 import Data.Text (Text)
 import Citeproc (Lang(..), parseLang)
 import Citeproc.Locale (getLocale)
-import Data.Maybe (fromMaybe)
 import Text.Pandoc.Error (PandocError(..))
 import Text.Pandoc.Class (PandocMonad, lookupEnv)
 import Text.Pandoc.Citeproc.BibTeX as BibTeX
@@ -49,7 +48,7 @@
 
 readBibTeX' :: PandocMonad m => Variant -> ReaderOptions -> Text -> m Pandoc
 readBibTeX' variant _opts t = do
-  lang <- fromMaybe (Lang "en" (Just "US")) . fmap parseLang
+  lang <- maybe (Lang "en" (Just "US")) parseLang
              <$> lookupEnv "LANG"
   locale <- case getLocale lang of
                Left e  -> throwError $ PandocCiteprocError e
@@ -67,4 +66,3 @@
                                             , citationHash = 0}]
                                             (str "[@*]"))
                         $ Pandoc nullMeta []
-
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -1046,7 +1046,7 @@
           _ -> 1
   let colSpan = toColSpan el
   let align = toAlignment el
-  (fmap (cell align 1 colSpan) . (parseMixed plain) . elContent) el
+  (fmap (cell align 1 colSpan) . parseMixed plain . elContent) el
 
 getInlines :: PandocMonad m => Element -> DB m Inlines
 getInlines e' = trimInlines . mconcat <$>
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -1,7 +1,6 @@
 {-# LANGUAGE CPP               #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE PatternGuards     #-}
-{-# LANGUAGE MultiWayIf        #-}
 {-# LANGUAGE FlexibleContexts  #-}
 {-# LANGUAGE ViewPatterns      #-}
 {- |
@@ -417,7 +416,7 @@
           (modify $ \s -> s { docxAnchorMap = M.insert anchor prevAnchor anchorMap})
         return mempty
       Nothing -> do
-        exts <- readerExtensions <$> asks docxOptions
+        exts <- asks (readerExtensions . docxOptions)
         let newAnchor =
               if not inHdrBool && anchor `elem` M.elems anchorMap
               then uniqueIdent exts [Str anchor]
@@ -462,7 +461,7 @@
   | (c:_) <- filter isAnchorSpan ils
   , (Span (anchIdent, ["anchor"], _) cIls) <- c = do
     hdrIDMap <- gets docxAnchorMap
-    exts <- readerExtensions <$> asks docxOptions
+    exts <- asks (readerExtensions . docxOptions)
     let newIdent = if T.null ident
                    then uniqueIdent exts ils (Set.fromList $ M.elems hdrIDMap)
                    else ident
@@ -475,7 +474,7 @@
 makeHeaderAnchor' (Header n (ident, classes, kvs) ils) =
   do
     hdrIDMap <- gets docxAnchorMap
-    exts <- readerExtensions <$> asks docxOptions
+    exts <- asks (readerExtensions . docxOptions)
     let newIdent = if T.null ident
                    then uniqueIdent exts ils (Set.fromList $ M.elems hdrIDMap)
                    else ident
@@ -736,4 +735,3 @@
 addAuthorAndDate :: T.Text -> Maybe T.Text -> [(T.Text, T.Text)]
 addAuthorAndDate author mdate =
   ("author", author) : maybe [] (\date -> [("date", date)]) mdate
-
diff --git a/src/Text/Pandoc/Readers/Docx/Combine.hs b/src/Text/Pandoc/Readers/Docx/Combine.hs
--- a/src/Text/Pandoc/Readers/Docx/Combine.hs
+++ b/src/Text/Pandoc/Readers/Docx/Combine.hs
@@ -109,7 +109,7 @@
     Underline lst     -> Just (Modifier underline, lst)
     Superscript lst   -> Just (Modifier superscript, lst)
     Subscript lst     -> Just (Modifier subscript, lst)
-    Link attr lst tgt -> Just (Modifier $ linkWith attr (fst tgt) (snd tgt), lst)
+    Link attr lst tgt -> Just (Modifier $ uncurry (linkWith attr) tgt, lst)
     Span attr lst     -> Just (AttrModifier spanWith attr, lst)
     _                 -> Nothing
   _ -> Nothing
diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs
--- a/src/Text/Pandoc/Readers/EPUB.hs
+++ b/src/Text/Pandoc/Readers/EPUB.hs
@@ -26,7 +26,7 @@
 import Data.List (isInfixOf)
 import qualified Data.Text as T
 import qualified Data.Map as M (Map, elems, fromList, lookup)
-import Data.Maybe (fromMaybe, mapMaybe)
+import Data.Maybe (mapMaybe)
 import qualified Data.Text.Lazy as TL
 import qualified Data.Text.Lazy.Encoding as TL
 import Network.URI (unEscapeString)
@@ -139,8 +139,7 @@
   where
     findCover e = maybe False (isInfixOf "cover-image")
                   (findAttr (emptyName "properties") e)
-               || fromMaybe False
-                  (liftM2 (==) coverId (findAttr (emptyName "id") e))
+               || Just True == liftM2 (==) coverId (findAttr (emptyName "id") e)
     parseItem e = do
       uid <- findAttrE (emptyName "id") e
       href <- findAttrE (emptyName "href") e
@@ -191,7 +190,7 @@
   let rootdir = dropFileName manifestFile
   --mime <- lookup "media-type" as
   manifest <- findEntryByPathE manifestFile archive
-  fmap ((,) rootdir) (parseXMLDocE . UTF8.toStringLazy . fromEntry $ manifest)
+  (rootdir,) <$> (parseXMLDocE . UTF8.toStringLazy . fromEntry $ manifest)
 
 -- Fixup
 
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -2168,6 +2168,8 @@
         contents <- mconcat <$>
             many ( snd <$> withRaw (controlSeq "parbox" >> parbox) -- #5711
                   <|>
+                   snd <$> withRaw (inlineEnvironment <|> dollarsMath)
+                  <|>
                    (do notFollowedBy
                          (() <$ amp <|> () <$ lbreak <|> end_ envname)
                        count 1 anyTok) )
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1918,7 +1918,7 @@
           -- notes, to avoid infinite looping with notes inside
           -- notes:
           let contents' = runF contents st{ stateNotes' = M.empty }
-          let addCitationNoteNum (c@Citation{}) =
+          let addCitationNoteNum c@Citation{} =
                 c{ citationNoteNum = noteNum }
           let adjustCite (Cite cs ils) =
                 Cite (map addCitationNoteNum cs) ils
diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs
--- a/src/Text/Pandoc/Readers/Metadata.hs
+++ b/src/Text/Pandoc/Readers/Metadata.hs
@@ -70,7 +70,7 @@
              -> ParserT Text ParserState m (F [MetaValue])
 yamlBsToRefs pMetaValue idpred bstr =
   case YAML.decodeNode' YAML.failsafeSchemaResolver False False bstr of
-       Right (YAML.Doc o@(YAML.Mapping _ _ _):_)
+       Right (YAML.Doc o@YAML.Mapping{}:_)
                 -> case lookupYAML "references" o of
                      Just (YAML.Sequence _ _ ns) -> do
                        let g n = case lookupYAML "id" n of
diff --git a/src/Text/Pandoc/Readers/Odt/ContentReader.hs b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
--- a/src/Text/Pandoc/Readers/Odt/ContentReader.hs
+++ b/src/Text/Pandoc/Readers/Odt/ContentReader.hs
@@ -25,6 +25,7 @@
 
 import Control.Applicative hiding (liftA, liftA2, liftA3)
 import Control.Arrow
+import Control.Monad ((<=<))
 
 import qualified Data.ByteString.Lazy as B
 import Data.Foldable (fold)
@@ -352,11 +353,11 @@
 
     lookupPreviousValue f = lookupPreviousStyleValue (fmap f . textProperties)
 
-    lookupPreviousValueM f = lookupPreviousStyleValue ((f =<<).textProperties)
+    lookupPreviousValueM f = lookupPreviousStyleValue (f <=< textProperties)
 
     lookupPreviousStyleValue f (ReaderState{..},_,mFamily)
       =     findBy f (extendedStylePropertyChain styleTrace styleSet)
-        <|> ( f =<< fmap (lookupDefaultStyle' styleSet) mFamily         )
+        <|> (f . lookupDefaultStyle' styleSet =<< mFamily)
 
 
 type ParaModifier = Blocks -> Blocks
diff --git a/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs b/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
--- a/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
+++ b/src/Text/Pandoc/Readers/Odt/Generic/Utils.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE ViewPatterns  #-}
 {- |
    Module      : Text.Pandoc.Reader.Odt.Generic.Utils
diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs
--- a/src/Text/Pandoc/Readers/Txt2Tags.hs
+++ b/src/Text/Pandoc/Readers/Txt2Tags.hs
@@ -464,7 +464,7 @@
   name <- string "%%" *> oneOfStringsCI (map fst commands)
   optional (try $ enclosed (char '(') (char ')') anyChar)
   lookAhead (spaceChar <|> oneOf specialChars <|> newline)
-  maybe (return mempty) (\f -> B.str <$> asks f) (lookup name commands)
+  maybe (return mempty) (\f -> asks (B.str . f)) (lookup name commands)
   where
     commands = [ ("date", date), ("mtime", mtime)
                , ("infile", T.pack . infile), ("outfile", T.pack . outfile)]
diff --git a/src/Text/Pandoc/Writers/CslJson.hs b/src/Text/Pandoc/Writers/CslJson.hs
--- a/src/Text/Pandoc/Writers/CslJson.hs
+++ b/src/Text/Pandoc/Writers/CslJson.hs
@@ -34,15 +34,15 @@
 import Citeproc.Locale (getLocale)
 import Citeproc.CslJson
 import Text.Pandoc.Options (WriterOptions)
-import Data.Maybe (fromMaybe, mapMaybe)
+import Data.Maybe (mapMaybe)
 import Data.Aeson.Encode.Pretty         (Config (..), Indent (Spaces),
                                          NumberFormat (Generic),
                                          defConfig, encodePretty')
 
 writeCslJson :: PandocMonad m => WriterOptions -> Pandoc -> m Text
 writeCslJson _opts (Pandoc meta _) = do
-  let lang = fromMaybe (Lang "en" (Just "US")) $
-              parseLang <$> (lookupMeta "lang" meta >>= metaValueToText)
+  let lang = maybe (Lang "en" (Just "US")) parseLang
+               (lookupMeta "lang" meta >>= metaValueToText)
   locale <- case getLocale lang of
                Left e  -> throwError $ PandocCiteprocError e
                Right l -> return l
@@ -77,6 +77,7 @@
 fromInline (Note _) = CslEmpty
 fromInline (Span (_,[cl],_) ils)
   | "csl-" `T.isPrefixOf` cl = CslDiv cl (fromInlines ils)
+  | cl == "nocase" = CslNoCase (fromInlines ils)
 fromInline (Span _ ils) = fromInlines ils
 
 toCslJson :: Locale -> [Reference Inlines] -> ByteString
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs
--- a/src/Text/Pandoc/Writers/DokuWiki.hs
+++ b/src/Text/Pandoc/Writers/DokuWiki.hs
@@ -26,7 +26,7 @@
 import Control.Monad.Reader (ReaderT, asks, local, runReaderT)
 import Control.Monad.State.Strict (StateT, evalStateT)
 import Data.Default (Default (..))
-import Data.List (intersect, transpose)
+import Data.List (transpose)
 import Data.Text (Text)
 import qualified Data.Text as T
 import Text.Pandoc.Class.PandocMonad (PandocMonad, report)
@@ -39,6 +39,8 @@
 import Text.Pandoc.Templates (renderTemplate)
 import Text.DocLayout (render, literal)
 import Text.Pandoc.Writers.Shared (defField, metaToContext, toLegacyTable)
+import Data.Maybe (fromMaybe)
+import qualified Data.Map as M
 
 data WriterState = WriterState {
   }
@@ -145,20 +147,13 @@
   let eqs = T.replicate ( 7 - level ) "="
   return $ eqs <> " " <> contents <> " " <> eqs <> "\n"
 
-blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
-  let at  = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp",
-                       "autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm",
-                       "cpp", "cpp-qt", "csharp", "css", "d", "delphi", "diff", "div", "dos", "eiffel", "fortran",
-                       "freebasic", "gml", "groovy", "html4strict", "idl", "ini", "inno", "io", "java", "java5",
-                       "javascript", "latex", "lisp", "lua", "matlab", "mirc", "mpasm", "mysql", "nsis", "objc",
-                       "ocaml", "ocaml-brief", "oobas", "oracle8", "pascal", "perl", "php", "php-brief", "plsql",
-                       "python", "qbasic", "rails", "reg", "robots", "ruby", "sas", "scheme", "sdlbasic",
-                       "smalltalk", "smarty", "sql", "tcl", "", "thinbasic", "tsql", "vb", "vbnet", "vhdl",
-                       "visualfoxpro", "winbatch", "xml", "xpp", "z80"]
+blockToDokuWiki _ (CodeBlock (_,classes,_) str) =
   return $ "<code" <>
-                (case at of
-                      []    -> ">\n"
-                      (x:_) -> " " <> x <> ">\n") <> str <> "\n</code>"
+           (case classes of
+               []    -> ""
+               (x:_) -> " " <> fromMaybe x (M.lookup x languageNames)) <>
+           ">\n" <> str <>
+           (if "\n" `T.isSuffixOf` str then "" else "\n") <> "</code>\n"
 
 blockToDokuWiki opts (BlockQuote blocks) = do
   contents <- blockListToDokuWiki opts blocks
@@ -507,3 +502,19 @@
     go (Just w) (Just h) = "?" <> w <> "x" <> h
     go Nothing  (Just h) = "?0x" <> h
     go Nothing  Nothing  = ""
+
+languageNames :: M.Map Text Text
+languageNames = M.fromList
+  [("cs", "csharp")
+  ,("coffee", "cofeescript")
+  ,("commonlisp", "lisp")
+  ,("gcc", "c")
+  ,("html", "html5")
+  ,("makefile", "make")
+  ,("objectivec", "objc")
+  ,("r", "rsplus")
+  ,("sqlmysql", "mysql")
+  ,("sqlpostgresql", "postgresql")
+  ,("sci", "scilab")
+  ,("xorg", "xorgconf")
+  ]
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs
--- a/src/Text/Pandoc/Writers/FB2.hs
+++ b/src/Text/Pandoc/Writers/FB2.hs
@@ -83,7 +83,7 @@
      secs <- renderSections 1 blocks
      let body = el "body" $ el "title" (el "p" title) : secs
      notes <- renderFootnotes
-     (imgs,missing) <- fmap imagesToFetch get >>= \s -> lift (fetchImages s)
+     (imgs,missing) <- get >>= (lift . fetchImages . imagesToFetch)
      let body' = replaceImagesWithAlt missing body
      let fb2_xml = el "FictionBook" (fb2_attrs, [desc, body'] ++ notes ++ imgs)
      return $ pack $ xml_head ++ showContent fb2_xml ++ "\n"
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -314,7 +314,7 @@
                           "/*]]>*/\n")
                           | otherwise -> mempty
                     Nothing -> mempty
-  let mCss :: Maybe [Text] = lookupContext "css" $ metadata
+  let mCss :: Maybe [Text] = lookupContext "css" metadata
   let context =   (if stHighlighting st
                       then case writerHighlightStyle opts of
                                 Just sty -> defField "highlighting-css"
@@ -1290,8 +1290,9 @@
                                         | any ((=="cite") . fst) kvs
                                           -> (Just attr, cs)
                                       cs -> (Nothing, cs)
-                                 H.q `fmap` inlineListToHtml opts lst'
-                                   >>= maybe return (addAttrs opts) maybeAttr
+                                 let addAttrsMb = maybe return (addAttrs opts)
+                                 inlineListToHtml opts lst' >>=
+                                   addAttrsMb maybeAttr . H.q
                                else (\x -> leftQuote >> x >> rightQuote)
                                     `fmap` inlineListToHtml opts lst
     (Math t str) -> do
@@ -1468,8 +1469,8 @@
 cslEntryToHtml opts (Para xs) = do
   html5 <- gets stHtml5
   let inDiv :: Text -> Html -> Html
-      inDiv cls x = ((if html5 then H5.div else H.div)
-                      x ! A.class_ (toValue cls))
+      inDiv cls x = (if html5 then H5.div else H.div)
+                      x ! A.class_ (toValue cls)
   let go (Span ("",[cls],[]) ils)
         | cls == "csl-block" || cls == "csl-left-margin" ||
           cls == "csl-right-inline" || cls == "csl-indent"
diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs
--- a/src/Text/Pandoc/Writers/JATS.hs
+++ b/src/Text/Pandoc/Writers/JATS.hs
@@ -108,7 +108,7 @@
                  (fmap chomp . inlinesToJATS opts)
                  meta
   main <- fromBlocks bodyblocks
-  notes <- reverse . map snd <$> gets jatsNotes
+  notes <- gets (reverse . map snd . jatsNotes)
   backs <- fromBlocks backblocks
   tagSet <- ask
   -- In the "Article Authoring" tag set, occurrence of fn-group elements
diff --git a/src/Text/Pandoc/Writers/Jira.hs b/src/Text/Pandoc/Writers/Jira.hs
--- a/src/Text/Pandoc/Writers/Jira.hs
+++ b/src/Text/Pandoc/Writers/Jira.hs
@@ -194,7 +194,7 @@
                               Jira.Monospaced (escapeSpecialChars cs)
         Emph xs            -> styled Jira.Emphasis xs
         Underline xs       -> styled Jira.Insert xs
-        Image attr cap tgt -> imageToJira attr cap (fst tgt) (snd tgt)
+        Image attr cap tgt -> uncurry (imageToJira attr cap) tgt
         LineBreak          -> pure . singleton $ Jira.Linebreak
         Link attr xs tgt   -> toJiraLink attr tgt xs
         Math mtype cs      -> mathToJira mtype cs
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs
--- a/src/Text/Pandoc/Writers/MediaWiki.hs
+++ b/src/Text/Pandoc/Writers/MediaWiki.hs
@@ -135,15 +135,22 @@
   let eqs = T.replicate level "="
   return $ eqs <> " " <> contents <> " " <> eqs <> "\n"
 
-blockToMediaWiki (CodeBlock (_,classes,_) str) = do
+blockToMediaWiki (CodeBlock (_,classes,keyvals) str) = do
   let at  = Set.fromList classes `Set.intersection` highlightingLangs
+  let numberLines = any (`elem` ["number","numberLines", "number-lines"])
+                    classes
+  let start = lookup "startFrom" keyvals
   return $
     case Set.toList at of
        [] -> "<pre" <> (if null classes
                            then ">"
                            else " class=\"" <> T.unwords classes <> "\">") <>
              escapeText str <> "</pre>"
-       (l:_) -> "<source lang=\"" <> l <> "\">" <> str <> "</source>"
+       (l:_) -> "<syntaxhighlight lang=\"" <> l <> "\"" <>
+                (if numberLines then " line" else "") <>
+                maybe "" (\x -> " start=\"" <> x <> "\"") start <>
+                ">" <> str <>
+                "</syntaxhighlight>"
             -- note:  no escape!  even for <!
 
 blockToMediaWiki (BlockQuote blocks) = do
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs
--- a/src/Text/Pandoc/Writers/Ms.hs
+++ b/src/Text/Pandoc/Writers/Ms.hs
@@ -489,8 +489,8 @@
       | otherwise
          -> case xs of
            [] -> return mempty
-           (x:rest) -> (<>) <$> (inlineToMs opts x)
-                            <*> (cslEntryToMs False opts (Para rest))
+           (x:rest) -> (<>) <$> inlineToMs opts x
+                            <*> cslEntryToMs False opts (Para rest)
 cslEntryToMs _ opts x = blockToMs opts x
 
 
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -601,7 +601,7 @@
       formatOpenDocument _fmtOpts = map (map toHlTok)
       toHlTok :: Token -> Doc Text
       toHlTok (toktype,tok) =
-        inTags False "text:span" [("text:style-name", (T.pack $ show toktype))] $ preformatted tok
+        inTags False "text:span" [("text:style-name", T.pack $ show toktype)] $ preformatted tok
       unhighlighted s = inlinedCode $ preformatted s
       preformatted s = handleSpaces $ escapeStringForXML s
       inlinedCode s = return $ inTags False "text:span" [("text:style-name", "Source_Text")] s
diff --git a/src/Text/Pandoc/Writers/Roff.hs b/src/Text/Pandoc/Writers/Roff.hs
--- a/src/Text/Pandoc/Writers/Roff.hs
+++ b/src/Text/Pandoc/Writers/Roff.hs
@@ -90,7 +90,7 @@
                 AllowUTF8 -> Text.singleton x : escapeString' escapeMode xs
                 AsciiOnly ->
                   let accents = catMaybes $ takeWhile isJust
-                        (map (\c -> Map.lookup c combiningAccentsMap) xs)
+                        (map (`Map.lookup` combiningAccentsMap) xs)
                       rest = drop (length accents) xs
                       s = case Map.lookup x characterCodeMap of
                             Just t  -> "\\[" <> Text.unwords (t:accents) <> "]"
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -19,12 +19,10 @@
 - HsYAML-0.2.1.0
 - HsYAML-aeson-0.2.0.0
 - doctemplates-0.8.2
-- commonmark-0.1.1
-- commonmark-extensions-0.2.0.2
+- commonmark-0.1.1.2
+- commonmark-extensions-0.2.0.4
 - commonmark-pandoc-0.2.0.1
-- git: https://github.com/jgm/citeproc
-  commit: 1860f189e9995c1dc27a68893bedfbf8de1ee67f
-
+- citeproc-0.1.1.1
 ghc-options:
    "$locals": -fhide-source-paths -Wno-missing-home-modules
 resolver: lts-14.6
diff --git a/test/command/3824.md b/test/command/3824.md
--- a/test/command/3824.md
+++ b/test/command/3824.md
@@ -8,6 +8,7 @@
   * hi<code>
  there
 </code>
+
   * ok
 
 ```
diff --git a/test/writer.dokuwiki b/test/writer.dokuwiki
--- a/test/writer.dokuwiki
+++ b/test/writer.dokuwiki
@@ -56,6 +56,7 @@
     print "working";
 }
 </code>
+
 A list:
 
   - item one
@@ -87,6 +88,7 @@
 
 this code block is indented by one tab
 </code>
+
 And:
 
 <code>
@@ -95,6 +97,7 @@
 These should not be escaped:  \$ \\ \> \[ \{
 </code>
 
+
 ----
 
 ====== Lists ======
@@ -277,6 +280,7 @@
 <code>
 { orange code block }
 </code>
+
 > <HTML><p></HTML>orange block quote<HTML></p></HTML>
 <HTML></dd></HTML><HTML></dl></HTML>
 
@@ -343,11 +347,13 @@
     foo
 </div>
 </code>
+
 As should this:
 
 <code>
 <div>foo</div>
 </code>
+
 Now, nested:
 
 foo
@@ -375,6 +381,7 @@
 <code>
 <!-- Comment -->
 </code>
+
 Just plain comment, with trailing spaces on the line:
 
 <HTML>
@@ -385,6 +392,7 @@
 <code>
 <hr />
 </code>
+
 Hr’s:
 
 <HTML>
@@ -571,6 +579,7 @@
 <code>
 [not]: /url
 </code>
+
 Foo [[url/|bar]].
 
 Foo [[url/|biz]].
@@ -603,6 +612,7 @@
 or here: <http://example.com/>
 </code>
 
+
 ----
 
 ====== Images ======
@@ -626,6 +636,7 @@
 <code>
   { <code> }
 </code>
+
 If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
 )) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and ''%%]%%'' verbatim characters, as well as [bracketed text].
 ))
