From d4349453b6fa0cd43fd4b4962cfd4b861e36615c Mon Sep 17 00:00:00 2001
From: Robert Cranston <rcrnstn@rcrnstn.net>
Date: Thu, 29 Aug 2019 10:58:49 +0200
Subject: [PATCH 3/5] Add title metadata to pandoc output

---
 plugin/vim-markdown-preview.vim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim
index 66170e7..e186d93 100644
--- a/plugin/vim-markdown-preview.vim
+++ b/plugin/vim-markdown-preview.vim
@@ -66,7 +66,7 @@ function! Vim_Markdown_Preview()
   elseif g:vim_markdown_preview_perl == 1
     call system('Markdown.pl "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
   elseif g:vim_markdown_preview_pandoc == 1
-    call system('pandoc --smart --standalone "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
+    call system('pandoc --smart --standalone --metadata=title:vim-markdown-preview.html --variable=title: "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
   else
     call system('markdown "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
   endif
@@ -120,7 +120,7 @@ function! Vim_Markdown_Preview_Local()
   elseif g:vim_markdown_preview_perl == 1
     call system('Markdown.pl "' . b:curr_file . '" > vim-markdown-preview.html')
   elseif g:vim_markdown_preview_pandoc == 1
-    call system('pandoc --smart --standalone "' . b:curr_file . '" > vim-markdown-preview.html')
+    call system('pandoc --smart --standalone --metadata=title:vim-markdown-preview.html --variable=title: "' . b:curr_file . '" > vim-markdown-preview.html')
   else
     call system('markdown "' . b:curr_file . '" > vim-markdown-preview.html')
   endif
-- 
2.17.1