na 1.2.58 → 1.2.59

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdea3ecffbd78f7d0ee482fe116b807af691545779283add0cbda732f253c019
4
- data.tar.gz: 50370bccecc6bb02db420e2d64b54c90b350c07136e58a96d904a5bc3d897bb7
3
+ metadata.gz: 271fbdd631a1b52f0f642ceb291de5b1827282b568d0b510d4cf3ab745660327
4
+ data.tar.gz: 730d5d92191a55c352282429f16215a0a2aab0087bb7072278034d44340ac0ac
5
5
  SHA512:
6
- metadata.gz: 587d1f01d6019f0bfc6c81b45458864ff1be36e917a50c2c891dea7f43cd2bb8fe1ed16cd3c4692768b47760119162291fd161d9901dedf63cbdca6fea891e71
7
- data.tar.gz: ce38f3f8210b4e5345c0dcc4edbd1c6935ca47068de13be456091163bade869d8cf0ea414f0281187a777ad3928522062f2f5a8d5948de71dadce22f17ff51fc
6
+ metadata.gz: 9b67d5f684b95260f3df6b991b9ad86004ab0a55a088f71aaf7028ac41671538109315dbc8e96188cc4ab3efd37472d1da1d3bf2c1f51cd2af3757bf687f5463
7
+ data.tar.gz: 8c3af84aac1bcc1355dcc0eb116146c28cbb2da00d6d636516a58d533bb71aff02960034fcdad9773989e746a01d7e64e0865bf20f3896092ecb4edf7a1475df
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ### 1.2.59
2
+
3
+ 2023-10-03 07:43
4
+
5
+ #### IMPROVED
6
+
7
+ - Ignore all YAML headers, even with empty values (which can be mistaked for a project)
8
+
9
+ #### FIXED
10
+
11
+ - Inserting new project after first project or inside of existing project
12
+
1
13
  ### 1.2.58
2
14
 
3
15
  2023-09-12 14:11
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.58)
4
+ na (1.2.59)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
7
  mdless (~> 1.0, >= 1.0.32)
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  _If you're one of the rare people like me who find this useful, feel free to
10
10
  [buy me some coffee][donate]._
11
11
 
12
- The current version of `na` is 1.2.58
12
+ The current version of `na` is 1.2.59
13
13
  .
14
14
 
15
15
  `na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
@@ -77,7 +77,7 @@ SYNOPSIS
77
77
  na [global options] command [command options] [arguments...]
78
78
 
79
79
  VERSION
80
- 1.2.58
80
+ 1.2.59
81
81
 
82
82
  GLOBAL OPTIONS
83
83
  -a, --add - Add a next action (deprecated, for backwards compatibility)
@@ -203,7 +203,7 @@ module NA
203
203
  content = content.split(/\n/).insert(line, input.join("\n")).join("\n")
204
204
  else
205
205
  split = content.split(/\n/)
206
- line = todo.projects.first&.last_line || 0
206
+ line = todo.projects.first&.line || 0
207
207
  before = split.slice(0, line).join("\n")
208
208
  after = split.slice(line, split.count - 0).join("\n")
209
209
  content = "#{before}\n#{input.join("\n")}\n#{after}"
data/lib/na/todo.rb CHANGED
@@ -99,9 +99,14 @@ module NA
99
99
  content = file.read_file
100
100
  indent_level = 0
101
101
  parent = []
102
+ in_yaml = false
102
103
  in_action = false
103
104
  content.split(/\n/).each.with_index do |line, idx|
104
- if line.project?
105
+ if in_yaml && line !~ /^(---|~~~)\s*$/
106
+ NA.notify("YAML: #{line}", debug: true)
107
+ elsif line =~ /^(---|~~~)\s*$/
108
+ in_yaml = !in_yaml
109
+ elsif line.project? && !in_yaml
105
110
  in_action = false
106
111
  proj = line.project
107
112
  indent = line.indent_level
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.58'
2
+ VERSION = '1.2.59'
3
3
  end
data/src/_README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  _If you're one of the rare people like me who find this useful, feel free to
10
10
  [buy me some coffee][donate]._
11
11
 
12
- The current version of `na` is <!--VER-->1.2.57<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.58<!--END VER-->.
13
13
 
14
14
  `na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
15
15
 
data/test.md ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ comment: 2023-09-03
3
+ keywords:
4
+ ---
5
+ Other New Project:
6
+ - testing @na
7
+ Brand New Project:
8
+ - testing @na
9
+ - testing @na
10
+ Project0:
11
+ - Test1
12
+ - Test2
13
+ Project1:
14
+ - Test4
15
+ - Test5
16
+ - Test6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: na
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.58
4
+ version: 1.2.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-12 00:00:00.000000000 Z
11
+ date: 2023-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -247,6 +247,7 @@ files:
247
247
  - na.rdoc
248
248
  - scripts/fixreadme.rb
249
249
  - src/_README.md
250
+ - test.md
250
251
  - test2.txt
251
252
  homepage: https://brettterpstra.com/projects/na/
252
253
  licenses: