polytexnic 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polytexnic/postprocessors/html.rb +2 -1
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/codelistings_spec.rb +20 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 892dfff956c8768a5699346b9fa25dc69ff75f18
|
4
|
+
data.tar.gz: ba8dd328779f0a4d004cb51eb2a3c80f3cecbb57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1801e0852177628915042d8fc3e3044f5463ca108ba3fc738012a70ad4fce74338d62ba08c9aec6ebeda2279bc54bcd8329463d74633353a93f63014b4aea2bb
|
7
|
+
data.tar.gz: dccbd899157e2d9fa56110ee283aa1681807bc93db003d3f1c80dea9ed97974417018fd6560a57e240006b4d67b35605c547cffdc6dd568325b5e961c1461150
|
@@ -609,7 +609,8 @@ module Polytexnic
|
|
609
609
|
number.name = 'span'
|
610
610
|
number['class'] = 'number'
|
611
611
|
if css_class == 'codelisting'
|
612
|
-
|
612
|
+
description = node.at_css('.description').content
|
613
|
+
number.content += ':' unless description.empty?
|
613
614
|
else
|
614
615
|
number.content += '.'
|
615
616
|
end
|
data/lib/polytexnic/version.rb
CHANGED
@@ -43,6 +43,26 @@ $ subl .gemrc
|
|
43
43
|
</div>
|
44
44
|
EOS
|
45
45
|
end
|
46
|
+
|
47
|
+
context "with an empty caption" do
|
48
|
+
let(:polytex) do <<-'EOS'
|
49
|
+
\chapter{Foo bar}
|
50
|
+
|
51
|
+
\begin{codelisting}
|
52
|
+
\codecaption{}
|
53
|
+
\label{code:create_gemrc}
|
54
|
+
%= lang:console
|
55
|
+
\begin{code}
|
56
|
+
$ subl .gemrc
|
57
|
+
\end{code}
|
58
|
+
\end{codelisting}
|
59
|
+
|
60
|
+
Listing~\ref{code:create_gemrc}
|
61
|
+
EOS
|
62
|
+
end
|
63
|
+
it { should include 'Listing 1.1' }
|
64
|
+
it { should_not include 'Listing 1.1:' }
|
65
|
+
end
|
46
66
|
end
|
47
67
|
|
48
68
|
describe "metacode listings" do
|