metanorma 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.adoc +13 -0
- data/lib/metanorma/input/asciidoc.rb +10 -0
- data/lib/metanorma/processor.rb +4 -0
- data/lib/metanorma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59c1e77fc3df934cbf3512262e9bcf280272db2489dbc640c2f508365b03589f
|
4
|
+
data.tar.gz: 0be23070d766e7531e2d60c49db7b788d0800b0b23548a77c32891135b833ed7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d4d1525a4a6917ef045806b05b2e8b2656ee9d3778e66e6748fffa30fa5584ac2225992edadf80a141dd98d50b2792def8b2069a15533db56d8e1dbc937a0c3
|
7
|
+
data.tar.gz: d045217e6895b936b86bf420bbe08ccc66fba36be294798fb341f5dc0ec0ad296f2fa58bc9d6fba9de33a70732b462bf86bb375cee31d473f05f9f3c27eb25b4
|
data/Gemfile.lock
CHANGED
data/README.adoc
CHANGED
@@ -194,6 +194,19 @@ $ metanorma -t mpfd mpfd-bpn.adoc
|
|
194
194
|
$ metanorma -t mpfd -r metanorma-mpfd mpfd-bpn.adoc
|
195
195
|
----
|
196
196
|
|
197
|
+
The `type` and `extension` options can be omitted if the corresponding metanorma directives
|
198
|
+
are included in the document as Metanorma directives; for Asciidoctor input, these take the form
|
199
|
+
of document attributes `mn-document-class:` and `:mn-output-extensions:`, e.g.
|
200
|
+
|
201
|
+
[source,asciidoctor]
|
202
|
+
----
|
203
|
+
= My ISO document
|
204
|
+
:mn-document-class: iso
|
205
|
+
:mn-output-extensions: html,xml,pdf
|
206
|
+
|
207
|
+
.Foreword
|
208
|
+
----
|
209
|
+
|
197
210
|
|
198
211
|
== Origin of name
|
199
212
|
|
@@ -15,6 +15,16 @@ module Metanorma
|
|
15
15
|
)
|
16
16
|
end
|
17
17
|
|
18
|
+
def extract_metanorma_options(file)
|
19
|
+
headerextract = file.sub(/\n\n.*$/m, "\n")
|
20
|
+
/\n:mn-document-class: (?<type>[^\n]+)\n/ =~ headerextract
|
21
|
+
/\n:mn-output-extensions: (?<extensions>[^\n]+)\n/ =~ headerextract
|
22
|
+
{
|
23
|
+
type: defined?(type) ? type : nil,
|
24
|
+
extensions: defined?(extensions) ? extensions : nil,
|
25
|
+
}.reject { |_, val| val.nil? }
|
26
|
+
end
|
27
|
+
|
18
28
|
def extract_options(file)
|
19
29
|
headerextract = file.sub(/\n\n.*$/m, "\n")
|
20
30
|
|
data/lib/metanorma/processor.rb
CHANGED
data/lib/metanorma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|