0
if old_line.spaces != old_line.tabs * 2
0
- raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation."
)
0
+ raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation."
, 1)
0
unless old_line.text.empty? || @haml_comment
0
if !flat? && line.tabs - old_line.tabs > 1
0
- raise SyntaxError.new("Illegal Indentation: Indenting more than once per line is illegal."
)
0
+ raise SyntaxError.new("Illegal Indentation: Indenting more than once per line is illegal."
, 1)
0
# Renders a block of text as plain text.
0
# Also checks for an illegally opened block.
0
- raise SyntaxError.new("Illegal Nesting: Nesting within plain text is illegal."
) if @block_opened
0
+ raise SyntaxError.new("Illegal Nesting: Nesting within plain text is illegal."
, 1) if @block_opened
0
@@ -518,10 +518,10 @@ END
0
attributes = parse_class_and_id(attributes)
0
Buffer.merge_attrs(attributes, static_attributes) if static_attributes
0
- raise SyntaxError.new("Illegal Nesting: Nesting within an atomic tag is illegal.") if @block_opened && atomic
0
- raise SyntaxError.new("Illegal Nesting: Content can't be both given on the same line as %#{tag_name} and nested within it.") if @block_opened && !value.empty?
0
- raise SyntaxError.new("Tag has no content.") if parse && value.empty?
0
- raise SyntaxError.new("Atomic tags can't have content.") if atomic && !value.empty?
0
+ raise SyntaxError.new("Illegal Nesting: Nesting within an atomic tag is illegal.", 1) if @block_opened && atomic
0
+ raise SyntaxError.new("Illegal Nesting: Content can't be both given on the same line as %#{tag_name} and nested within it.", 1) if @block_opened && !value.empty?
0
+ raise SyntaxError, "Tag has no content." if parse && value.empty?
0
+ raise SyntaxError, "Atomic tags can't have content." if atomic && !value.empty?
0
atomic = true if !@block_opened && value.empty? && @options[:autoclose].include?(tag_name)
0
conditional << ">" if conditional
0
if @block_opened && !content.empty?
0
- raise SyntaxError.new('Illegal Nesting: Nesting within a tag that already has content is illegal.'
)
0
+ raise SyntaxError.new('Illegal Nesting: Nesting within a tag that already has content is illegal.'
, 1)
0
open = "<!--#{conditional} "
0
# Renders an XHTML doctype or XML shebang.
0
def render_doctype(line)
0
- raise SyntaxError.new("Illegal Nesting: Nesting within a header command is illegal."
) if @block_opened
0
+ raise SyntaxError.new("Illegal Nesting: Nesting within a header command is illegal."
, 1) if @block_opened
0
push_text text_for_doctype(line)
0
spaces = line.index(/([^ ]|$)/)
0
return nil if line.strip.empty?
0
- raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation."
)
0
+ raise SyntaxError.new("Illegal Indentation: Only two space characters are allowed as tabulation."
, 2)
Comments
No one has commented yet.