redcloth-formatters-docbook 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -266,7 +266,7 @@ module RedCloth::Formatters::Docbook
266
266
  out = "<para>\n"
267
267
  out += "\t<example xml:id=\"#{parse_id(options[:name])}\">\n"
268
268
  out += "\t<title>#{options[:name]}</title>\n"
269
- out += "\t<programlisting width=\"100%\">\n"
269
+ out += "\t<programlisting width=\"100%\" linenumbering=\"numbered\"><![CDATA[\n"
270
270
  out
271
271
  end
272
272
 
@@ -275,7 +275,7 @@ module RedCloth::Formatters::Docbook
275
275
  end
276
276
 
277
277
  def bc_close(opts)
278
- out = "</programlisting>\n"
278
+ out = "]]></programlisting>\n"
279
279
  out += "\t</example>\n"
280
280
  out += "</para>\n"
281
281
  out
@@ -343,11 +343,11 @@ module RedCloth::Formatters::Docbook
343
343
 
344
344
  # escapement for HTML in a PRE tag
345
345
  def escape_pre(text)
346
- text.gsub! "&", "&amp;"
347
- text.gsub! "<", "&lt;"
348
- text.gsub! ">", "&gt;"
349
- text.gsub! "'", "&apos;"
350
- text.gsub! '"', "&quote;"
346
+ #text.gsub! "&", "&amp;"
347
+ #text.gsub! "<", "&lt;"
348
+ #text.gsub! ">", "&gt;"
349
+ #text.gsub! "'", "&apos;"
350
+ #text.gsub! '"', "&quote;"
351
351
  text
352
352
  end
353
353
 
@@ -1,7 +1,7 @@
1
1
  module Redcloth
2
2
  module Formatters
3
3
  module Docbook
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  require 'RedCloth'
2
2
  require 'redcloth-formatters-docbook'
3
- require 'spec/helpers'
3
+ require_relative 'helpers'
4
4
 
5
5
  describe RedCloth::Formatters::Docbook do
6
6
 
@@ -11,7 +11,7 @@
11
11
  <para>
12
12
  <example xml:id="RubyCarClass">
13
13
  <title>Ruby Car Class</title>
14
- <programlisting width="100%">
14
+ <programlisting width="100%"><![CDATA[
15
15
  class Car
16
16
 
17
17
  def start_engine
@@ -20,7 +20,7 @@ class Car
20
20
  def stop_engine
21
21
  end
22
22
 
23
- end</programlisting>
23
+ end]]></programlisting>
24
24
  </example>
25
25
  </para>
26
26
 
@@ -29,11 +29,11 @@ end</programlisting>
29
29
  <para>
30
30
  <example xml:id="ConsumingtheManAtBarProtocol1">
31
31
  <title>Consuming the ManAtBar Protocol 1</title>
32
- <programlisting width="100%">
32
+ <programlisting width="100%"><![CDATA[
33
33
  -(void)didUpdateBloodAlcoholLevel:(Man*)aMan to:(float)level{
34
- if(level &lt; 3.0) return;
34
+ if(level < 3.0) return;
35
35
  else [self callAmbulance];
36
- }</programlisting>
36
+ }]]></programlisting>
37
37
  </example>
38
38
  </para>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcloth-formatters-docbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-26 00:00:00.000000000 Z
12
+ date: 2012-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: RedCloth
16
- requirement: &70130260404840 !ruby/object:Gem::Requirement
16
+ requirement: &70357688319820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 4.2.8
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70130260404840
24
+ version_requirements: *70357688319820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70130260403900 !ruby/object:Gem::Requirement
27
+ requirement: &70357688319000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.6'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70130260403900
35
+ version_requirements: *70357688319000
36
36
  description: Allows RedCloth to convert .textiles to Docbook XMLs
37
37
  email:
38
38
  - tommylefunk@googlemail.com