nora_mark 0.2beta3 → 0.2beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -0
  3. data/Gemfile +2 -0
  4. data/README.md +17 -12
  5. data/example/nora-simple.css +52 -0
  6. data/example/noramark-reference-ja.nora +246 -0
  7. data/example/noramark-reference-ja_00001.xhtml +187 -0
  8. data/lib/nora_mark/html/{abstract_item_writer.rb → abstract_node_writer.rb} +3 -3
  9. data/lib/nora_mark/html/context.rb +3 -21
  10. data/lib/nora_mark/html/frontmatter_writer.rb +33 -0
  11. data/lib/nora_mark/html/generator.rb +122 -100
  12. data/lib/nora_mark/html/pages.rb +3 -9
  13. data/lib/nora_mark/html/paragraph_writer.rb +27 -23
  14. data/lib/nora_mark/html/tag_writer.rb +33 -34
  15. data/lib/nora_mark/html/writer_selector.rb +3 -3
  16. data/lib/nora_mark/node.rb +31 -0
  17. data/lib/nora_mark/parser.kpeg +133 -79
  18. data/lib/nora_mark/parser.kpeg.rb +1822 -1526
  19. data/lib/nora_mark/parser.rb +4 -23
  20. data/lib/nora_mark/version.rb +1 -1
  21. data/lib/nora_mark.rb +7 -2
  22. data/nora_mark.gemspec +1 -0
  23. data/spec/epub30-schemas/epub-nav-30.nvdl +16 -0
  24. data/spec/epub30-schemas/epub-nav-30.rnc +10 -0
  25. data/spec/epub30-schemas/epub-nav-30.sch +72 -0
  26. data/spec/epub30-schemas/epub-svg-30.nvdl +15 -0
  27. data/spec/epub30-schemas/epub-svg-30.rnc +15 -0
  28. data/spec/epub30-schemas/epub-svg-30.sch +10 -0
  29. data/spec/epub30-schemas/epub-xhtml-30.nvdl +15 -0
  30. data/spec/epub30-schemas/epub-xhtml-30.rnc +37 -0
  31. data/spec/epub30-schemas/epub-xhtml-30.sch +377 -0
  32. data/spec/epub30-schemas/epub30-catalog.xml +335 -0
  33. data/spec/epub30-schemas/media-overlay-30.nvdl +14 -0
  34. data/spec/epub30-schemas/media-overlay-30.rnc +46 -0
  35. data/spec/epub30-schemas/media-overlay-30.sch +9 -0
  36. data/spec/epub30-schemas/mod/datatypes.rnc +143 -0
  37. data/spec/epub30-schemas/mod/epub-mathml3-30.rnc +74 -0
  38. data/spec/epub30-schemas/mod/epub-prefix-attr.rnc +8 -0
  39. data/spec/epub30-schemas/mod/epub-ssml-attrs.rnc +11 -0
  40. data/spec/epub30-schemas/mod/epub-svg11-30.rnc +12 -0
  41. data/spec/epub30-schemas/mod/epub-svg11-re.sch +7 -0
  42. data/spec/epub30-schemas/mod/epub-switch.rnc +32 -0
  43. data/spec/epub30-schemas/mod/epub-trigger.rnc +17 -0
  44. data/spec/epub30-schemas/mod/epub-type-attr.rnc +7 -0
  45. data/spec/epub30-schemas/mod/epub-xhtml-mathml3-30.rnc +5 -0
  46. data/spec/epub30-schemas/mod/epub-xhtml-svg11-30.rnc +6 -0
  47. data/spec/epub30-schemas/mod/html5/LICENSE +23 -0
  48. data/spec/epub30-schemas/mod/html5/README +21 -0
  49. data/spec/epub30-schemas/mod/html5/html5-aria-30.rnc +105 -0
  50. data/spec/epub30-schemas/mod/html5/html5-attrib-30.rnc +44 -0
  51. data/spec/epub30-schemas/mod/html5/html5-document-30.rnc +44 -0
  52. data/spec/epub30-schemas/mod/html5/html5-edit-30.rnc +24 -0
  53. data/spec/epub30-schemas/mod/html5/html5-embed-30.rnc +155 -0
  54. data/spec/epub30-schemas/mod/html5/html5-forms-30.rnc +431 -0
  55. data/spec/epub30-schemas/mod/html5/html5-grouping-30.rnc +115 -0
  56. data/spec/epub30-schemas/mod/html5/html5-interactive-30.rnc +86 -0
  57. data/spec/epub30-schemas/mod/html5/html5-models-30.rnc +10 -0
  58. data/spec/epub30-schemas/mod/html5/html5-phrasing-30.rnc +134 -0
  59. data/spec/epub30-schemas/mod/html5/html5-script-30.rnc +164 -0
  60. data/spec/epub30-schemas/mod/html5/html5-sections-30.rnc +58 -0
  61. data/spec/epub30-schemas/mod/html5/html5-style-30.rnc +18 -0
  62. data/spec/epub30-schemas/mod/id-unique.sch +10 -0
  63. data/spec/epub30-schemas/mod/mathml/LICENSE +3 -0
  64. data/spec/epub30-schemas/mod/mathml/mathml3-common.rnc +84 -0
  65. data/spec/epub30-schemas/mod/mathml/mathml3-content.rnc +373 -0
  66. data/spec/epub30-schemas/mod/mathml/mathml3-presentation.rnc +536 -0
  67. data/spec/epub30-schemas/mod/mathml/mathml3-strict-content.rnc +60 -0
  68. data/spec/epub30-schemas/mod/security/LICENSE +4 -0
  69. data/spec/epub30-schemas/mod/security/Lenient-Encryption11-ghc.rnc +41 -0
  70. data/spec/epub30-schemas/mod/security/Lenient-Encryption11.rnc +39 -0
  71. data/spec/epub30-schemas/mod/security/Lenient-Signature-exclusiveC14N.rnc +25 -0
  72. data/spec/epub30-schemas/mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc +32 -0
  73. data/spec/epub30-schemas/mod/security/Lenient-Signature11-properties.rnc +30 -0
  74. data/spec/epub30-schemas/mod/security/Lenient-Signature11.rnc +28 -0
  75. data/spec/epub30-schemas/mod/security/Strict-Encryption.rnc +27 -0
  76. data/spec/epub30-schemas/mod/security/Strict-Signature.rnc +22 -0
  77. data/spec/epub30-schemas/mod/security/exc-c14n.rnc +39 -0
  78. data/spec/epub30-schemas/mod/security/security_any.rnc +15 -0
  79. data/spec/epub30-schemas/mod/security/xenc-allowAnyForeign.rnc +25 -0
  80. data/spec/epub30-schemas/mod/security/xenc-schema-11.rnc +96 -0
  81. data/spec/epub30-schemas/mod/security/xenc-schema.rnc +145 -0
  82. data/spec/epub30-schemas/mod/security/xenc11-allowAnyForeign.rnc +19 -0
  83. data/spec/epub30-schemas/mod/security/xmldsig-allowAnyForeign.rnc +47 -0
  84. data/spec/epub30-schemas/mod/security/xmldsig-core-schema.rnc +276 -0
  85. data/spec/epub30-schemas/mod/security/xmldsig-filter2.rnc +16 -0
  86. data/spec/epub30-schemas/mod/security/xmldsig-properties-schema.rnc +34 -0
  87. data/spec/epub30-schemas/mod/security/xmldsig11-allowAnyForeign.rnc +18 -0
  88. data/spec/epub30-schemas/mod/security/xmldsig11-schema.rnc +133 -0
  89. data/spec/epub30-schemas/mod/security/xmlsec-ghc-allowAnyForeign.rnc +21 -0
  90. data/spec/epub30-schemas/mod/security/xmlsec-ghc-schema.rnc +42 -0
  91. data/spec/epub30-schemas/mod/svg11/LICENSE +1 -0
  92. data/spec/epub30-schemas/mod/svg11/README.txt +8 -0
  93. data/spec/epub30-schemas/mod/svg11/svg11-flat.rnc +3999 -0
  94. data/spec/epub30-schemas/ocf-container-30.rnc +16 -0
  95. data/spec/epub30-schemas/ocf-encryption-30.rnc +12 -0
  96. data/spec/epub30-schemas/ocf-signatures-30.rnc +8 -0
  97. data/spec/epub30-schemas/package-30.nvdl +14 -0
  98. data/spec/epub30-schemas/package-30.rnc +91 -0
  99. data/spec/epub30-schemas/package-30.sch +137 -0
  100. data/spec/jing-20091111/bin/jing.jar +0 -0
  101. data/spec/nora_mark_spec.rb +229 -68
  102. data/spec/spec_helper.rb +16 -0
  103. metadata +179 -6
  104. data/lib/nora_mark/html/header_writer.rb +0 -35
  105. data/spec/fixture/test_src_ja.nora +0 -50
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,6 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
1
4
  begin
2
5
  require 'rspec'
3
6
  rescue LoadError
@@ -13,6 +16,19 @@ RSpec.configure do |config|
13
16
  config.tty = true
14
17
  # Use the specified formatter
15
18
  config.formatter = :documentation # :progress, :html, :textmate
19
+
20
+ def capture(stream)
21
+ begin
22
+ stream = stream.to_s
23
+ eval "$#{stream} = StringIO.new"
24
+ yield
25
+ result = eval("$#{stream}").string
26
+ ensure
27
+ eval "$#{stream} = #{stream.upcase}"
28
+ end
29
+ result
30
+ end
31
+
16
32
  end
17
33
 
18
34
  require 'rspec/core/formatters/base_text_formatter'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nora_mark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2beta3
4
+ version: 0.2beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - KOJIMA Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-02 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kpeg
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.14'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: nokogiri
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -60,28 +74,110 @@ extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
62
76
  - ".gitignore"
77
+ - ".travis.yml"
63
78
  - CHANGELOG.md
64
79
  - Gemfile
65
80
  - LICENSE
66
81
  - README.md
67
82
  - Rakefile
83
+ - example/nora-simple.css
84
+ - example/noramark-reference-ja.nora
85
+ - example/noramark-reference-ja_00001.xhtml
68
86
  - lib/nora_mark.rb
69
- - lib/nora_mark/html/abstract_item_writer.rb
87
+ - lib/nora_mark/html/abstract_node_writer.rb
70
88
  - lib/nora_mark/html/context.rb
89
+ - lib/nora_mark/html/frontmatter_writer.rb
71
90
  - lib/nora_mark/html/generator.rb
72
- - lib/nora_mark/html/header_writer.rb
73
91
  - lib/nora_mark/html/pages.rb
74
92
  - lib/nora_mark/html/paragraph_writer.rb
75
93
  - lib/nora_mark/html/tag_writer.rb
76
94
  - lib/nora_mark/html/util.rb
77
95
  - lib/nora_mark/html/writer_selector.rb
96
+ - lib/nora_mark/node.rb
78
97
  - lib/nora_mark/parser.kpeg
79
98
  - lib/nora_mark/parser.kpeg.rb
80
99
  - lib/nora_mark/parser.rb
81
100
  - lib/nora_mark/version.rb
82
101
  - nora_mark.gemspec
83
102
  - spec/created_files/.gitignore
84
- - spec/fixture/test_src_ja.nora
103
+ - spec/epub30-schemas/epub-nav-30.nvdl
104
+ - spec/epub30-schemas/epub-nav-30.rnc
105
+ - spec/epub30-schemas/epub-nav-30.sch
106
+ - spec/epub30-schemas/epub-svg-30.nvdl
107
+ - spec/epub30-schemas/epub-svg-30.rnc
108
+ - spec/epub30-schemas/epub-svg-30.sch
109
+ - spec/epub30-schemas/epub-xhtml-30.nvdl
110
+ - spec/epub30-schemas/epub-xhtml-30.rnc
111
+ - spec/epub30-schemas/epub-xhtml-30.sch
112
+ - spec/epub30-schemas/epub30-catalog.xml
113
+ - spec/epub30-schemas/media-overlay-30.nvdl
114
+ - spec/epub30-schemas/media-overlay-30.rnc
115
+ - spec/epub30-schemas/media-overlay-30.sch
116
+ - spec/epub30-schemas/mod/datatypes.rnc
117
+ - spec/epub30-schemas/mod/epub-mathml3-30.rnc
118
+ - spec/epub30-schemas/mod/epub-prefix-attr.rnc
119
+ - spec/epub30-schemas/mod/epub-ssml-attrs.rnc
120
+ - spec/epub30-schemas/mod/epub-svg11-30.rnc
121
+ - spec/epub30-schemas/mod/epub-svg11-re.sch
122
+ - spec/epub30-schemas/mod/epub-switch.rnc
123
+ - spec/epub30-schemas/mod/epub-trigger.rnc
124
+ - spec/epub30-schemas/mod/epub-type-attr.rnc
125
+ - spec/epub30-schemas/mod/epub-xhtml-mathml3-30.rnc
126
+ - spec/epub30-schemas/mod/epub-xhtml-svg11-30.rnc
127
+ - spec/epub30-schemas/mod/html5/LICENSE
128
+ - spec/epub30-schemas/mod/html5/README
129
+ - spec/epub30-schemas/mod/html5/html5-aria-30.rnc
130
+ - spec/epub30-schemas/mod/html5/html5-attrib-30.rnc
131
+ - spec/epub30-schemas/mod/html5/html5-document-30.rnc
132
+ - spec/epub30-schemas/mod/html5/html5-edit-30.rnc
133
+ - spec/epub30-schemas/mod/html5/html5-embed-30.rnc
134
+ - spec/epub30-schemas/mod/html5/html5-forms-30.rnc
135
+ - spec/epub30-schemas/mod/html5/html5-grouping-30.rnc
136
+ - spec/epub30-schemas/mod/html5/html5-interactive-30.rnc
137
+ - spec/epub30-schemas/mod/html5/html5-models-30.rnc
138
+ - spec/epub30-schemas/mod/html5/html5-phrasing-30.rnc
139
+ - spec/epub30-schemas/mod/html5/html5-script-30.rnc
140
+ - spec/epub30-schemas/mod/html5/html5-sections-30.rnc
141
+ - spec/epub30-schemas/mod/html5/html5-style-30.rnc
142
+ - spec/epub30-schemas/mod/id-unique.sch
143
+ - spec/epub30-schemas/mod/mathml/LICENSE
144
+ - spec/epub30-schemas/mod/mathml/mathml3-common.rnc
145
+ - spec/epub30-schemas/mod/mathml/mathml3-content.rnc
146
+ - spec/epub30-schemas/mod/mathml/mathml3-presentation.rnc
147
+ - spec/epub30-schemas/mod/mathml/mathml3-strict-content.rnc
148
+ - spec/epub30-schemas/mod/security/LICENSE
149
+ - spec/epub30-schemas/mod/security/Lenient-Encryption11-ghc.rnc
150
+ - spec/epub30-schemas/mod/security/Lenient-Encryption11.rnc
151
+ - spec/epub30-schemas/mod/security/Lenient-Signature-exclusiveC14N.rnc
152
+ - spec/epub30-schemas/mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc
153
+ - spec/epub30-schemas/mod/security/Lenient-Signature11-properties.rnc
154
+ - spec/epub30-schemas/mod/security/Lenient-Signature11.rnc
155
+ - spec/epub30-schemas/mod/security/Strict-Encryption.rnc
156
+ - spec/epub30-schemas/mod/security/Strict-Signature.rnc
157
+ - spec/epub30-schemas/mod/security/exc-c14n.rnc
158
+ - spec/epub30-schemas/mod/security/security_any.rnc
159
+ - spec/epub30-schemas/mod/security/xenc-allowAnyForeign.rnc
160
+ - spec/epub30-schemas/mod/security/xenc-schema-11.rnc
161
+ - spec/epub30-schemas/mod/security/xenc-schema.rnc
162
+ - spec/epub30-schemas/mod/security/xenc11-allowAnyForeign.rnc
163
+ - spec/epub30-schemas/mod/security/xmldsig-allowAnyForeign.rnc
164
+ - spec/epub30-schemas/mod/security/xmldsig-core-schema.rnc
165
+ - spec/epub30-schemas/mod/security/xmldsig-filter2.rnc
166
+ - spec/epub30-schemas/mod/security/xmldsig-properties-schema.rnc
167
+ - spec/epub30-schemas/mod/security/xmldsig11-allowAnyForeign.rnc
168
+ - spec/epub30-schemas/mod/security/xmldsig11-schema.rnc
169
+ - spec/epub30-schemas/mod/security/xmlsec-ghc-allowAnyForeign.rnc
170
+ - spec/epub30-schemas/mod/security/xmlsec-ghc-schema.rnc
171
+ - spec/epub30-schemas/mod/svg11/LICENSE
172
+ - spec/epub30-schemas/mod/svg11/README.txt
173
+ - spec/epub30-schemas/mod/svg11/svg11-flat.rnc
174
+ - spec/epub30-schemas/ocf-container-30.rnc
175
+ - spec/epub30-schemas/ocf-encryption-30.rnc
176
+ - spec/epub30-schemas/ocf-signatures-30.rnc
177
+ - spec/epub30-schemas/package-30.nvdl
178
+ - spec/epub30-schemas/package-30.rnc
179
+ - spec/epub30-schemas/package-30.sch
180
+ - spec/jing-20091111/bin/jing.jar
85
181
  - spec/nokogiri_test_helper.rb
86
182
  - spec/nora_mark_spec.rb
87
183
  - spec/spec_helper.rb
@@ -110,7 +206,84 @@ specification_version: 4
110
206
  summary: simple and customizable text markup language for EPUB
111
207
  test_files:
112
208
  - spec/created_files/.gitignore
113
- - spec/fixture/test_src_ja.nora
209
+ - spec/epub30-schemas/epub-nav-30.nvdl
210
+ - spec/epub30-schemas/epub-nav-30.rnc
211
+ - spec/epub30-schemas/epub-nav-30.sch
212
+ - spec/epub30-schemas/epub-svg-30.nvdl
213
+ - spec/epub30-schemas/epub-svg-30.rnc
214
+ - spec/epub30-schemas/epub-svg-30.sch
215
+ - spec/epub30-schemas/epub-xhtml-30.nvdl
216
+ - spec/epub30-schemas/epub-xhtml-30.rnc
217
+ - spec/epub30-schemas/epub-xhtml-30.sch
218
+ - spec/epub30-schemas/epub30-catalog.xml
219
+ - spec/epub30-schemas/media-overlay-30.nvdl
220
+ - spec/epub30-schemas/media-overlay-30.rnc
221
+ - spec/epub30-schemas/media-overlay-30.sch
222
+ - spec/epub30-schemas/mod/datatypes.rnc
223
+ - spec/epub30-schemas/mod/epub-mathml3-30.rnc
224
+ - spec/epub30-schemas/mod/epub-prefix-attr.rnc
225
+ - spec/epub30-schemas/mod/epub-ssml-attrs.rnc
226
+ - spec/epub30-schemas/mod/epub-svg11-30.rnc
227
+ - spec/epub30-schemas/mod/epub-svg11-re.sch
228
+ - spec/epub30-schemas/mod/epub-switch.rnc
229
+ - spec/epub30-schemas/mod/epub-trigger.rnc
230
+ - spec/epub30-schemas/mod/epub-type-attr.rnc
231
+ - spec/epub30-schemas/mod/epub-xhtml-mathml3-30.rnc
232
+ - spec/epub30-schemas/mod/epub-xhtml-svg11-30.rnc
233
+ - spec/epub30-schemas/mod/html5/LICENSE
234
+ - spec/epub30-schemas/mod/html5/README
235
+ - spec/epub30-schemas/mod/html5/html5-aria-30.rnc
236
+ - spec/epub30-schemas/mod/html5/html5-attrib-30.rnc
237
+ - spec/epub30-schemas/mod/html5/html5-document-30.rnc
238
+ - spec/epub30-schemas/mod/html5/html5-edit-30.rnc
239
+ - spec/epub30-schemas/mod/html5/html5-embed-30.rnc
240
+ - spec/epub30-schemas/mod/html5/html5-forms-30.rnc
241
+ - spec/epub30-schemas/mod/html5/html5-grouping-30.rnc
242
+ - spec/epub30-schemas/mod/html5/html5-interactive-30.rnc
243
+ - spec/epub30-schemas/mod/html5/html5-models-30.rnc
244
+ - spec/epub30-schemas/mod/html5/html5-phrasing-30.rnc
245
+ - spec/epub30-schemas/mod/html5/html5-script-30.rnc
246
+ - spec/epub30-schemas/mod/html5/html5-sections-30.rnc
247
+ - spec/epub30-schemas/mod/html5/html5-style-30.rnc
248
+ - spec/epub30-schemas/mod/id-unique.sch
249
+ - spec/epub30-schemas/mod/mathml/LICENSE
250
+ - spec/epub30-schemas/mod/mathml/mathml3-common.rnc
251
+ - spec/epub30-schemas/mod/mathml/mathml3-content.rnc
252
+ - spec/epub30-schemas/mod/mathml/mathml3-presentation.rnc
253
+ - spec/epub30-schemas/mod/mathml/mathml3-strict-content.rnc
254
+ - spec/epub30-schemas/mod/security/LICENSE
255
+ - spec/epub30-schemas/mod/security/Lenient-Encryption11-ghc.rnc
256
+ - spec/epub30-schemas/mod/security/Lenient-Encryption11.rnc
257
+ - spec/epub30-schemas/mod/security/Lenient-Signature-exclusiveC14N.rnc
258
+ - spec/epub30-schemas/mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc
259
+ - spec/epub30-schemas/mod/security/Lenient-Signature11-properties.rnc
260
+ - spec/epub30-schemas/mod/security/Lenient-Signature11.rnc
261
+ - spec/epub30-schemas/mod/security/Strict-Encryption.rnc
262
+ - spec/epub30-schemas/mod/security/Strict-Signature.rnc
263
+ - spec/epub30-schemas/mod/security/exc-c14n.rnc
264
+ - spec/epub30-schemas/mod/security/security_any.rnc
265
+ - spec/epub30-schemas/mod/security/xenc-allowAnyForeign.rnc
266
+ - spec/epub30-schemas/mod/security/xenc-schema-11.rnc
267
+ - spec/epub30-schemas/mod/security/xenc-schema.rnc
268
+ - spec/epub30-schemas/mod/security/xenc11-allowAnyForeign.rnc
269
+ - spec/epub30-schemas/mod/security/xmldsig-allowAnyForeign.rnc
270
+ - spec/epub30-schemas/mod/security/xmldsig-core-schema.rnc
271
+ - spec/epub30-schemas/mod/security/xmldsig-filter2.rnc
272
+ - spec/epub30-schemas/mod/security/xmldsig-properties-schema.rnc
273
+ - spec/epub30-schemas/mod/security/xmldsig11-allowAnyForeign.rnc
274
+ - spec/epub30-schemas/mod/security/xmldsig11-schema.rnc
275
+ - spec/epub30-schemas/mod/security/xmlsec-ghc-allowAnyForeign.rnc
276
+ - spec/epub30-schemas/mod/security/xmlsec-ghc-schema.rnc
277
+ - spec/epub30-schemas/mod/svg11/LICENSE
278
+ - spec/epub30-schemas/mod/svg11/README.txt
279
+ - spec/epub30-schemas/mod/svg11/svg11-flat.rnc
280
+ - spec/epub30-schemas/ocf-container-30.rnc
281
+ - spec/epub30-schemas/ocf-encryption-30.rnc
282
+ - spec/epub30-schemas/ocf-signatures-30.rnc
283
+ - spec/epub30-schemas/package-30.nvdl
284
+ - spec/epub30-schemas/package-30.rnc
285
+ - spec/epub30-schemas/package-30.sch
286
+ - spec/jing-20091111/bin/jing.jar
114
287
  - spec/nokogiri_test_helper.rb
115
288
  - spec/nora_mark_spec.rb
116
289
  - spec/spec_helper.rb
@@ -1,35 +0,0 @@
1
- module NoraMark
2
- module Html
3
- class HeaderWriter
4
- include Util
5
- def initialize(generator)
6
- @generator = generator
7
- @context = generator.context
8
- @writers = {
9
- :stylesheets => proc do |item|
10
- @context.stylesheets.concat( item[:stylesheets].map do
11
- |s|
12
- if s =~ /^(.+?\.css):\((.+?)\)$/
13
- [$1, $2]
14
- else
15
- s
16
- end
17
- end)
18
- end,
19
- :title => proc do |item|
20
- @context.title = escape_html item[:title].strip
21
- end,
22
- :lang => proc do |item|
23
- @context.lang = escape_html item[:lang].strip
24
- end,
25
- :paragraph_style => proc do |item|
26
- @context.paragraph_style = item[:paragraph_style].strip
27
- end
28
- }
29
- end
30
- def write(item)
31
- @writers[item[:type]].call item
32
- end
33
- end
34
- end
35
- end
@@ -1,50 +0,0 @@
1
- title: the sample text
2
- sect.preface {
3
- h1: 前書き
4
- 前書きのようなものをここでかく。
5
- 「前書き」とは英語では[s.strong{preface}]のことだろうか。
6
- }
7
-
8
- newpage:
9
-
10
- art.main {
11
-
12
- h1: 本文
13
- ここからが本文。
14
- チェックする項目は
15
-
16
- 1: ol要素が出ること
17
- 2: ul要素がでること
18
- 3: dl要素
19
- 4: spanがでること
20
-
21
- である。
22
-
23
- [s.strong{NoraMark}] の要素は、次のものからなる。
24
-
25
- *: 行
26
- *: パラグラフ
27
- *: 行コマンド
28
- *: ブロックコマンド
29
- *: インラインコマンド
30
-
31
- ;: 行: 行コマンドでマークアップされていない行は、pタグで囲まれる。
32
- ;: パラグラフ: 空行で区切られた一連の行は、div class='pgroup' で囲まれる。空行ではなく、別のコマンドによってもパラグラフは生成される。
33
-
34
- コマンドについて説明する。
35
-
36
- ;:コマンド文字列: <コマンド名>[#id名]*[.クラス名]*[(パラメータ)]
37
- ;: 行コマンド : 行先頭に、<コマンド文字列>: がくる。続く行末までの文字が処理対象となる。p/h以外のブロック要素を生成する行コマンドは、暗黙のブロックを中断する。
38
- ;: ブロックコマンド : 行先頭に<コマンド文字列>{ がくる。その行では文字を続けない。} 単独の行で閉じる。
39
- ;: インラインコマンド : 行の途中にあらわれる[<コマンド文字列>{<文字>}] の列。
40
-
41
- 定義済みコマンドは次のとおり。
42
-
43
- ;.commands: 行コマンド: p
44
- ;: パラグラフを中断する行コマンド: newpage, image, h1, h2, h3, h4, h5, h6, *(箇条書き), 数字(列挙), ;(定義リスト)
45
- ;:ブロックコマンド: d, art, sec。未定義であっても、ブロックコマンドの形式をしていればなんでも<コマンド名> ... </コマンド名> に展開される。
46
- ;:インラインコマンド: s, l, img。 その他は、インラインコマンドの形式をしていれば、なんでも<コマンド名> ... </コマンド名> に展開される。
47
-
48
-
49
-
50
- }