fictive 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fictive/syntax.rb +9 -0
- data/lib/fictive/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a6b8f48c6c24d464a8ff938d1fbe6c715e4d8fa
|
|
4
|
+
data.tar.gz: d2a0f159d2aebb37217778f3bb15febe4adec0ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 536096df4ca0e146a62710ee1b2c2bc8326e6001aa29596d5f1c930bfef88932a65064c816ce93160e680dfc9e3f245fe5eda7b4118b3231b4da1df9514a5962
|
|
7
|
+
data.tar.gz: e2b6c266cc59baf7f608c81822c71ce1faa8046d08486d3c00796578f44a6a8e9b158cfe92f6f2af0ab6396990bac2fdc71d989b795a79c901a5ae223ae208f9
|
data/lib/fictive/syntax.rb
CHANGED
|
@@ -45,6 +45,7 @@ module Fictive
|
|
|
45
45
|
def parse_block_level
|
|
46
46
|
return parse_atx_header if @scanner.scan(/#/)
|
|
47
47
|
return parse_blank_line if @scanner.scan(/#{EOL}/)
|
|
48
|
+
return parse_list_item if @scanner.scan(/-/)
|
|
48
49
|
|
|
49
50
|
parse_paragraph
|
|
50
51
|
end
|
|
@@ -64,6 +65,14 @@ module Fictive
|
|
|
64
65
|
end
|
|
65
66
|
end
|
|
66
67
|
|
|
68
|
+
def parse_list_item
|
|
69
|
+
if @scanner.scan(/\s/)
|
|
70
|
+
Element.new(:list_item, scan_to_eol)
|
|
71
|
+
else
|
|
72
|
+
parse_paragraph
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
67
76
|
def parse_paragraph
|
|
68
77
|
text = scan_to_eol
|
|
69
78
|
Element.new(:paragraph, text)
|
data/lib/fictive/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fictive
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mark Rickerby
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|