beet / alfred_noteplan_actions

Alfred workflow for handy Noteplan actions
38 stars 4 forks source link

Error in 't' action #12

Closed jgclark closed 4 years ago

jgclark commented 4 years ago

This was working fine some while ago, but in the last few weeks the 't' action has stopped working properly. After typing the first search character after 't ', Alfred then drops to default searches.

Looking in the debug window I see this always pops up: [14:06:23.657] ERROR: NotePlan Actions[Script Filter] Code 1: /Users/masked/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.79E3480A-F746-4160-8F1A-8C56AB104AA3/lib/note_plan/note_components/heading.rb:14:in 'contents': undefined method 'gsub' for nil:NilClass (NoMethodError)

I'm not sure why it can't find gsub all of a sudden. I use it find in other ruby scripts. I'm running latest version of NP, but have stuck to macOS 10.14.6.

jgclark commented 4 years ago

Ping.

brokosz commented 4 years ago

updating heading.rb to note_contents.scan(/^#[\s]+.*$/).first.to_s.gsub(/^# /, "") fixed it for me

beet commented 4 years ago

Sorry guys, this one slipped through the cracks as well. Thanks for putting in a PR, will check it out.

beet commented 4 years ago

Included in v0.6.0