aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs2
-rw-r--r--tests/writer.html4
3 files changed, 4 insertions, 4 deletions
diff --git a/README b/README
index ceb2808fe..5a99cea7c 100644
--- a/README
+++ b/README
@@ -915,7 +915,7 @@ Images with captions
An image occurring by itself in a paragraph will be rendered as
a figure with a caption. (In LaTeX, a figure environment will be
used; in HTML, the image will be placed in a `div` with class
-`figure`, together with a caption in a `div` with class `caption`.)
+`figure`, together with a caption in a `p` with class `caption`.)
The image's alt text will be used as the caption.
![This is the caption](/url/of/image.png)
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index a05e3c725..020edea65 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -264,7 +264,7 @@ blockToHtml opts (Para [Image txt (s,tit)]) = do
img <- inlineToHtml opts (Image txt (s,tit))
capt <- inlineListToHtml opts txt
return $ thediv ! [theclass "figure"] <<
- [img, thediv ! [theclass "caption"] << capt]
+ [img, paragraph ! [theclass "caption"] << capt]
blockToHtml opts (Para lst) = inlineListToHtml opts lst >>= (return . paragraph)
blockToHtml _ (RawHtml str) = return $ primHtml str
blockToHtml _ (HorizontalRule) = return $ hr
diff --git a/tests/writer.html b/tests/writer.html
index 5f0f86deb..f41a8e60a 100644
--- a/tests/writer.html
+++ b/tests/writer.html
@@ -1158,8 +1158,8 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
>From “Voyage dans la Lune” by Georges Melies (1902):</p
><div class="figure"
><img src="lalune.jpg" title="Voyage dans la Lune" alt="lalune"
- /><div class="caption"
- >lalune</div
+ /><p class="caption"
+ >lalune</p
></div
><p
>Here is a movie <img src="movie.jpg" alt="movie"