git.iko.soy/typeable/pandoc
on master help sign in
HTML Writer: consistently use dashed class-names

see #3556

commit8d7ce0fdf0a71e8c34fb7e3bff8909884f3af3a2 authormb21 <mb21@users.noreply.github.com> dateTue 31 Oct 2017, 10:32 (9 years ago) parent3eaa6ff
7 files changed+23−23
data/epub.css+1−1 data/templates/default.s5+1−1 src/Text/Pandoc/Writers/HTML.hs+3−3 test/s5-basic.html+1−1 test/s5-fancy.html+1−1 test/writer.html4+8−8 test/writer.html5+8−8
data/epub.css+1−1
@@ -12,7 +12,7 @@ h2.author { }
1212h3.date { }
1313ol.toc { padding: 0; margin-left: 1em; }
1414ol.toc li { list-style-type: none; margin: 0; padding: 0; }
15−a.footnoteRef { vertical-align: super; }
15+a.footnote-ref { vertical-align: super; }
1616em, em em em, em em em em em { font-style: italic;}
1717em em, em em em em { font-style: normal; }
1818
data/templates/default.s5+1−1
@@ -64,7 +64,7 @@ $endfor$
6464</div>
6565<div class="presentation">
6666$if(title)$
67−<div class="titleslide slide">
67+<div class="title-slide slide">
6868 <h1 class="title">$title$</h1>
6969$if(subtitle)$
7070 <h2 class="subtitle">$subtitle$</h2>
src/Text/Pandoc/Writers/HTML.hs+3−3
@@ -438,7 +438,7 @@ elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elemen
438438 [] -> []
439439 (x:xs) -> x ++ concatMap inDiv xs
440440 let inNl x = mconcat $ nl opts : intersperse (nl opts) x ++ [nl opts]
441− let classes' = ["titleslide" | titleSlide] ++ ["slide" | slide] ++
441+ let classes' = ["title-slide" | titleSlide] ++ ["slide" | slide] ++
442442 ["section" | (slide || writerSectionDivs opts) &&
443443 not html5 ] ++
444444 ["level" ++ show level | slide || writerSectionDivs opts ]
@@ -1100,7 +1100,7 @@ inlineToHtml opts inline = do
11001100 let link = H.a ! A.href (toValue $ "#" ++
11011101 revealSlash ++
11021102 writerIdentifierPrefix opts ++ "fn" ++ ref)
1103− ! A.class_ "footnoteRef"
1103+ ! A.class_ "footnote-ref"
11041104 ! prefixedId opts ("fnref" ++ ref)
11051105 $ (if isJust epubVersion
11061106 then id
@@ -1120,7 +1120,7 @@ blockListToNote :: PandocMonad m => WriterOptions -> String -> [Block] -> StateT
11201120blockListToNote opts ref blocks =
11211121 -- If last block is Para or Plain, include the backlink at the end of
11221122 -- that block. Otherwise, insert a new Plain block with the backlink.
1123− let backlink = [Link ("",["footnoteBack"],[]) [Str "↩"] ("#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref,[])]
1123+ let backlink = [Link ("",["footnote-back"],[]) [Str "↩"] ("#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref,[])]
11241124 blocks' = if null blocks
11251125 then []
11261126 else let lastBlock = last blocks
test/s5-basic.html+1−1
@@ -38,7 +38,7 @@
3838</div>
3939</div>
4040<div class="presentation">
41−<div class="titleslide slide">
41+<div class="title-slide slide">
4242 <h1 class="title">My S5 Document</h1>
4343 <h3 class="author">Sam Smith<br/>Jen Jones</h3>
4444 <h4 class="date">July 15, 2006</h4>
test/s5-fancy.html+1−1
@@ -239,7 +239,7 @@
239239</div>
240240</div>
241241<div class="presentation">
242−<div class="titleslide slide">
242+<div class="title-slide slide">
243243 <h1 class="title">My S5 Document</h1>
244244 <h3 class="author">Sam Smith<br/>Jen Jones</h3>
245245 <h4 class="date">July 15, 2006</h4>
test/writer.html4+8−8
@@ -524,25 +524,25 @@ Blah
524524<p>Here is a movie <img src="movie.jpg" alt="movie" /> icon.</p>
525525<hr />
526526<h1 id="footnotes">Footnotes</h1>
527−<p>Here is a footnote reference,<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a> This should <em>not</em> be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnoteRef" id="fnref3"><sup>3</sup></a></p>
527+<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a> This should <em>not</em> be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnote-ref" id="fnref3"><sup>3</sup></a></p>
528528<blockquote>
529−<p>Notes can go in quotes.<a href="#fn4" class="footnoteRef" id="fnref4"><sup>4</sup></a></p>
529+<p>Notes can go in quotes.<a href="#fn4" class="footnote-ref" id="fnref4"><sup>4</sup></a></p>
530530</blockquote>
531531<ol style="list-style-type: decimal">
532−<li>And in list items.<a href="#fn5" class="footnoteRef" id="fnref5"><sup>5</sup></a></li>
532+<li>And in list items.<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a></li>
533533</ol>
534534<p>This paragraph should not be part of the note, as it is not indented.</p>
535535<div class="footnotes">
536536<hr />
537537<ol>
538−<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnoteBack">↩</a></p></li>
538+<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnote-back">↩</a></p></li>
539539<li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p>
540540<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
541541<pre><code> { &lt;code&gt; }</code></pre>
542−<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnoteBack">↩</a></p></li>
543−<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnoteBack">↩</a></p></li>
544−<li id="fn4"><p>In quote.<a href="#fnref4" class="footnoteBack">↩</a></p></li>
545−<li id="fn5"><p>In list.<a href="#fnref5" class="footnoteBack">↩</a></p></li>
542+<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnote-back">↩</a></p></li>
543+<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back">↩</a></p></li>
544+<li id="fn4"><p>In quote.<a href="#fnref4" class="footnote-back">↩</a></p></li>
545+<li id="fn5"><p>In list.<a href="#fnref5" class="footnote-back">↩</a></p></li>
546546</ol>
547547</div>
548548</body>
test/writer.html5+8−8
@@ -526,25 +526,25 @@ Blah
526526<p>Here is a movie <img src="movie.jpg" alt="movie" /> icon.</p>
527527<hr />
528528<h1 id="footnotes">Footnotes</h1>
529−<p>Here is a footnote reference,<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a> This should <em>not</em> be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnoteRef" id="fnref3"><sup>3</sup></a></p>
529+<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a> This should <em>not</em> be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnote-ref" id="fnref3"><sup>3</sup></a></p>
530530<blockquote>
531−<p>Notes can go in quotes.<a href="#fn4" class="footnoteRef" id="fnref4"><sup>4</sup></a></p>
531+<p>Notes can go in quotes.<a href="#fn4" class="footnote-ref" id="fnref4"><sup>4</sup></a></p>
532532</blockquote>
533533<ol type="1">
534−<li>And in list items.<a href="#fn5" class="footnoteRef" id="fnref5"><sup>5</sup></a></li>
534+<li>And in list items.<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a></li>
535535</ol>
536536<p>This paragraph should not be part of the note, as it is not indented.</p>
537537<section class="footnotes">
538538<hr />
539539<ol>
540−<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnoteBack">↩</a></p></li>
540+<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnote-back">↩</a></p></li>
541541<li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p>
542542<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
543543<pre><code> { &lt;code&gt; }</code></pre>
544−<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnoteBack">↩</a></p></li>
545−<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnoteBack">↩</a></p></li>
546−<li id="fn4"><p>In quote.<a href="#fnref4" class="footnoteBack">↩</a></p></li>
547−<li id="fn5"><p>In list.<a href="#fnref5" class="footnoteBack">↩</a></p></li>
544+<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnote-back">↩</a></p></li>
545+<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back">↩</a></p></li>
546+<li id="fn4"><p>In quote.<a href="#fnref4" class="footnote-back">↩</a></p></li>
547+<li id="fn5"><p>In list.<a href="#fnref5" class="footnote-back">↩</a></p></li>
548548</ol>
549549</section>
550550</body>