Skip to content

Commit

Permalink
if taskpaper, avoid HTML rendering
Browse files Browse the repository at this point in the history
- FIXED: If taskpaper is true, avoid all parsing other than tasks, projects, notes, and tags
  • Loading branch information
ttscoff committed Nov 24, 2023
1 parent 2bc919f commit 0341c61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/mdless/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,11 @@ def preprocess(input)
end
end

input = CLIMarkdown::TaskPaper.highlight(input, @theme) if @options[:taskpaper]
if @options[:taskpaper]
input = CLIMarkdown::TaskPaper.highlight(input, @theme)
input = highlight_tags(input)
return input
end

input = color_meta(input)

Expand Down
1 change: 0 additions & 1 deletion lib/mdless/taskpaper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def color(key)
end

def is_taskpaper?(input)
pp input.to_enum(:scan, PROJECT_RX).map { Regexp.last_match }
projects = input.split(PROJECT_RX)
tasks = 0
if projects.count > 1
Expand Down

0 comments on commit 0341c61

Please sign in to comment.