diff --git a/README.md b/README.md
index a4102d759418eb6398fe5bb79a34575336e478f3..e31fc42aae63d78ce3fd1175d311a763a777daa5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ As an application wiki, XWiki allows for the storing of structured data and the
 ![logo](http://www.xwiki.org/xwiki/bin/view/Main/Logo?xpage=plain&act=svg&finput=logo-xwikiorange.svg&foutput=logo-xwikiorange.png&width=200)
 
 # Table of contents
-<!-- generated with pandoc -f gfm --toc -o readme-toc.md README.md -->
+<!-- generated with pandoc -f gfm --toc -s README.md -t markdown | sed '/^$/,$d' -->
 
 -   [Introduction](#introduction)
 -   [How to use this image](#how-to-use-this-image)