Skip to content

Commit

Permalink
use @non_parsed_commands
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Aug 18, 2019
1 parent cd10530 commit 89f5e10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/review/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module ReVIEW
class Compiler
def initialize(strategy)
@strategy = strategy

## commands which do not parse block lines in compiler
@non_parsed_commands = %i[embed texequation graph]
end

attr_reader :strategy
Expand Down Expand Up @@ -422,7 +425,7 @@ def compile_paragraph(f)
def read_command(f)
line = f.gets
name = line.slice(/[a-z]+/).to_sym
ignore_inline = %i[embed texequation graph].include?(name)
ignore_inline = @non_parsed_commands.include?(name)
args = parse_args(line.sub(%r{\A//[a-z]+}, '').rstrip.chomp('{'), name)
@strategy.doc_status[name] = true
lines = block_open?(line) ? read_block(f, ignore_inline) : nil
Expand Down

0 comments on commit 89f5e10

Please sign in to comment.