You are here

private function HamlParser::isElement in Sassy 7

* Return a value indicating if the line is an element. * Will set the tag to div if it is an implied div. *

Parameters

array line: * @return boolean true if the line is an element, false if not

1 call to HamlParser::isElement()
HamlParser::parseLine in phamlp/haml/HamlParser.php
* Parse a line of Haml into a HamlNode for the document tree *

File

phamlp/haml/HamlParser.php, line 713

Class

HamlParser
HamlParser class. Parses {@link http://haml-lang.com/ Haml} view files. @package PHamlP @subpackage Haml

Code

private function isElement(&$line) {
  if (empty($line[self::HAML_TAG]) && (!empty($line[self::HAML_CLASS]) || !empty($line[self::HAML_ID]) || !empty($line[self::HAML_XML_ATTRIBUTES]) || !empty($line[self::HAML_RUBY_ATTRIBUTES]) || !empty($line[self::HAML_OBJECT_REFERENCE]))) {
    $line[self::HAML_TAG] = 'div';
  }
  return !empty($line[self::HAML_TAG]);
}