ntxt 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. data/bin/ntxt +1 -0
  2. data/lib/ntxt/parser.rb +4 -5
  3. metadata +7 -7
data/bin/ntxt CHANGED
@@ -25,6 +25,7 @@ else
25
25
  end
26
26
 
27
27
  OptionParser.new do |opt|
28
+ opt.version="1.0.3"
28
29
 
29
30
  opt.on('--trace', 'Trace through the file printing summaries.' ) do |v|
30
31
  $configs[:cmd] = 'trace'
@@ -239,21 +239,20 @@ module Ntxt
239
239
  def parseIndent(indentLevel, text)
240
240
  state = @stack[-1]
241
241
  line = state.currLine
242
-
242
+
243
243
  # Build the block. Update the offset.
244
244
  block = Block.new(state.block.ntxt,
245
245
  state.block,
246
246
  state.start,
247
247
  state.offset)
248
248
 
249
- id = rand(100)
250
-
251
249
  # Position state at the ed of the block.
252
250
  # Blocks are ended by empty lines or lines with the = starting them.
253
251
  while line
254
252
 
255
- break unless line =~ /^(\s*)([^=\s].*)$/
256
-
253
+ break if Parser::hlevel(line)
254
+ break unless line =~ /^(\s*)(..*)$/
255
+
257
256
  nextIndentLevel = $~[1].length
258
257
  nextLine = $~[2]
259
258
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ntxt
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Baskinger
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-07 00:00:00 Z
18
+ date: 2011-12-09 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: |
@@ -30,10 +30,10 @@ extra_rdoc_files: []
30
30
 
31
31
  files:
32
32
  - README.rdoc
33
- - lib/ntxt.rb
34
- - lib/ntxt/ntxt.rb
35
33
  - lib/ntxt/block.rb
36
34
  - lib/ntxt/parser.rb
35
+ - lib/ntxt/ntxt.rb
36
+ - lib/ntxt.rb
37
37
  - bin/ntxt
38
38
  homepage: http://coffeesgone.wordpress.com
39
39
  licenses: []
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements: []
65
65
 
66
66
  rubyforge_project:
67
- rubygems_version: 1.8.11
67
+ rubygems_version: 1.7.2
68
68
  signing_key:
69
69
  specification_version: 3
70
70
  summary: A parser and some tools for the ntxt text block format.