]> git.wincent.com - docvim.git/commitdiff
Fix ordering within links in TOC 0.1.0.0
authorGreg Hurrell <greg@hurrell.net>
Thu, 9 Jun 2016 14:25:25 +0000 (07:25 -0700)
committerGreg Hurrell <greg@hurrell.net>
Thu, 9 Jun 2016 14:25:25 +0000 (07:25 -0700)
lib/Docvim/Printer/Vim.hs
tests/fixtures/vim/headings.golden
tests/fixtures/vim/integration-ferret-plugin.golden
tests/fixtures/vim/integration-pinnacle.golden

index c72817504163f22124a8520662593b2e6081860e..145a2927d7587da108da0dda986c05b21726ea80 100644 (file)
@@ -197,7 +197,7 @@ toc t = do
         format                = map pad numbered
         longest               = maximum (map (length . snd) numbered )
         numbered              = map prefix number
-        number                = zip3 [1..] t (map (\x -> normalize $ x ++ "-" ++ p) t)
+        number                = zip3 [1..] t (map (\x -> normalize $ p ++ "-" ++ x) t)
         prefix (num, desc, l) = (show num ++ ". " ++ desc ++ "  ", l)
         pad (lhs, rhs)        = lhs ++ replicate (longest - length lhs) ' ' ++ link rhs
   -- TODO: consider doing this for markdown format too
index df473fc6cd3d463b862e29a3b32dfe685abcce24..f42eb11eb7da2e1c46c051c8c8441797ed16eb0b 100644 (file)
@@ -3,8 +3,8 @@
 CONTENTS                                                          *foo-contents*
 
 
-1. A heading                                                               |a-heading-foo|
-2. An overlength heading when I really should have chose something shorter  |an-overlength-heading-when-i-really-should-have-chose-something-shorter-foo|
+1. A heading                                                               |foo-a-heading|
+2. An overlength heading when I really should have chose something shorter  |foo-an-overlength-heading-when-i-really-should-have-chose-something-shorter|
 
 A HEADING                                                        *foo-a-heading*
 
index 9ae2fa144d473c8427c9ae7495df96833848a1fc..31d8a136c32674f9db271fba3a8db2fc156e49f5 100644 (file)
@@ -2,21 +2,21 @@
 
 CONTENTS                                                       *ferret-contents*
 
-1. Intro                  |intro-ferret|
-2. Installation           |installation-ferret|
-3. Options                |options-ferret|
-4. Commands               |commands-ferret|
-5. Mappings               |mappings-ferret|
-6. Custom autocommands    |custom-autocommands-ferret|
-7. Overrides              |overrides-ferret|
-8. Troubleshooting        |troubleshooting-ferret|
-9. FAQ                    |faq-ferret|
-10. Related               |related-ferret|
-11. Website               |website-ferret|
-12. License               |license-ferret|
-13. Development           |development-ferret|
-14. Authors               |authors-ferret|
-15. History               |history-ferret|
+1. Intro                  |ferret-intro|
+2. Installation           |ferret-installation|
+3. Options                |ferret-options|
+4. Commands               |ferret-commands|
+5. Mappings               |ferret-mappings|
+6. Custom autocommands    |ferret-custom-autocommands|
+7. Overrides              |ferret-overrides|
+8. Troubleshooting        |ferret-troubleshooting|
+9. FAQ                    |ferret-faq|
+10. Related               |ferret-related|
+11. Website               |ferret-website|
+12. License               |ferret-license|
+13. Development           |ferret-development|
+14. Authors               |ferret-authors|
+15. History               |ferret-history|
 
 INTRO                                                             *ferret-intro*
 
index 62489993c79aa8d775150282b18cd0e941a58b0a..33c32781377ab2595beb75891b8a65bc39f22b49 100644 (file)
@@ -2,13 +2,13 @@
 
 CONTENTS                                                     *pinnacle-contents*
 
-1. Intro             |intro-pinnacle|
-2. Installation      |installation-pinnacle|
-3. Website           |website-pinnacle|
-4. License           |license-pinnacle|
-5. Development       |development-pinnacle|
-6. Authors           |authors-pinnacle|
-7. History           |history-pinnacle|
+1. Intro             |pinnacle-intro|
+2. Installation      |pinnacle-installation|
+3. Website           |pinnacle-website|
+4. License           |pinnacle-license|
+5. Development       |pinnacle-development|
+6. Authors           |pinnacle-authors|
+7. History           |pinnacle-history|
 
 INTRO                                                           *pinnacle-intro*