]> git.wincent.com - docvim.git/commitdiff
Inject other kinds of headings
authorGreg Hurrell <greg@hurrell.net>
Wed, 8 Jun 2016 06:25:06 +0000 (23:25 -0700)
committerGreg Hurrell <greg@hurrell.net>
Wed, 8 Jun 2016 06:25:06 +0000 (23:25 -0700)
Mostly seems to work? Other than some suspicious empty
headings in some golden files.

lib/Docvim/Compile.hs
tests/fixtures/markdown/integration-ferret-ftplugin-qf.golden
tests/fixtures/markdown/integration-ferret-plugin.golden
tests/fixtures/markdown/integration-ferret-private.golden
tests/fixtures/parser/integration-ferret-ftplugin-qf.golden
tests/fixtures/parser/integration-ferret-plugin.golden
tests/fixtures/parser/integration-ferret-private.golden
tests/fixtures/vim/integration-ferret-ftplugin-qf.golden
tests/fixtures/vim/integration-ferret-plugin.golden
tests/fixtures/vim/integration-ferret-private.golden
tests/fixtures/vim/options.golden

index c9e6b6d54296743a59aa11509962bd8dc1bbef7a..aea83da8cf1b5eaf00b35dd4d1da915c8868ef06 100644 (file)
@@ -17,8 +17,12 @@ import Docvim.Visitor (extract)
 -- | "Compile" a set of translation units into a project.
 compile :: [Node] -> Node
 compile ns = do
-  let (ast, footer) = extract extractFooter $ Project ns
-  let ast2 = injectCommands ast
+  let ast = foldr (\f x -> f x) (Project ns) [ injectCommands
+                                             , injectFunctions
+                                             , injectMappings
+                                             , injectOptions
+                                             ]
+  let (ast2, footer) = extract extractFooter ast
   let (ast3, plugin) = extract extractPlugin ast2
   let (ast4, commands) = extract extractCommands ast3
   let (ast5, command) = extract extractCommand ast4
index c1414fbc7823976b57ffe91d56c439be08766720..d5f8a9fc8831fcb41b62ed8bcc677e621fe13ed0 100644 (file)
@@ -1,3 +1,5 @@
+## Options
+
 <p align="right"><a name="gferretqfoptions" href="#user-content-gferretqfoptions"><code>g:FerretQFOptions</code></a></p>
 ### `g:FerretQFOptions` (boolean, default: 1)
 
index 29c5485f10067d07075b8468b16e1e4995e3c79f..56a5774f9bd7f74cfae9d3ceee08167c93f93662 100644 (file)
@@ -54,6 +54,8 @@ To generate help tags under Pathogen, you can do so from inside Vim with:
 :call pathogen#helptags()
 ```
 
+## Options
+
 ## Commands
 
 <p align="right"><a name="ack" href="#user-content-ack"><code>:Ack</code></a></p>
index c629b3e6820bd56dfb7a76902529e568b8827e3f..ee320ba76f1ebb92c6e5f9728a44697c18289fb9 100644 (file)
@@ -1,3 +1,5 @@
+## Options
+
 <p align="right"><a name="gferretdispatch" href="#user-content-gferretdispatch"><code>g:FerretDispatch</code></a></p>
 ### `g:FerretDispatch` (boolean, default: 1)
 
index 2f0081bc6882c27b5e468507bdf920842b1648d6..e0432da74250ef0f8f534da7ea94dc322aea0728 100644 (file)
@@ -38,6 +38,7 @@ Project
               "vnoremap <buffer> <silent> d :call ferret#private#qf_delete()<CR>"
           , GenericStatement "endif"
           ]
+      , OptionsAnnotation
       ]
   , OptionAnnotation "g:FerretQFOptions" "boolean" (Just "1")
   , Paragraph
index b947b04d02be715cda2f234de18e06587a636370..b8a7e2a9b30d2d3cc1d7a97f6eeab814d2a1bdc0 100644 (file)
@@ -910,6 +910,7 @@ Project
               { letLexpr = "&cpoptions " , letValue = "s:cpoptions" }
           , UnletStatement { unletBang = False , unletBody = "s:cpoptions" }
           ]
+      , OptionsAnnotation
       , CommandsAnnotation
       ]
   , CommandAnnotation "Ack" (Just "{pattern} {options}")
index 1c7d6e1f8dd6e1f5dba5440307db9070628c35aa..41aca138e83a45f2a02dd1f58cd0f1469a63cd26 100644 (file)
@@ -345,6 +345,7 @@ Project
                   ]
               }
           ]
+      , OptionsAnnotation
       ]
   , OptionAnnotation "g:FerretDispatch" "boolean" (Just "1")
   , Paragraph
index 45e08e93cd2b86a1b016eb6500ae3fd98003078e..1a90e939e5092d7608d25dcf7d36295fe1948a5b 100644 (file)
@@ -1,3 +1,5 @@
+OPTIONS
+
 
                                                              *g:FerretQFOptions*
 |g:FerretQFOptions|                                         boolean (default: 1)
index 5eda345c51367389395cbdf79ba0780533e2e46c..e65b4ccaa7cc7139d4ca495ba457e9fb9f2cc2bf 100644 (file)
@@ -75,6 +75,8 @@ To generate help tags under Pathogen, you can do so from inside Vim with:
 >
     :call pathogen#helptags()
 <
+OPTIONS                                                         *ferret-options*
+
 COMMANDS                                                       *ferret-commands*
 
 :Ack {pattern} {options}                                                  *:Ack*
index 7577a92eb043bcdfe336a6af8eaf16092f80cefd..582107a38d445475ca33cbc40eba6d662bd285bd 100644 (file)
@@ -1,3 +1,5 @@
+OPTIONS
+
 
                                                               *g:FerretDispatch*
 |g:FerretDispatch|                                          boolean (default: 1)
index da5d57980aa1c3d2ba0f93efc7139af9a64840f2..444f638256d0ea63709f2eed2f514c2fd7abe195 100644 (file)
@@ -1,3 +1,5 @@
+OPTIONS
+
 
                                                                          *g:Foo*
 |g:Foo|                                                  string (default: "foo")