source/index.js
function parse_node_name(name)
{
	// is it a "modifier" style class
	let is_a_modifier = false

	// detect modifier style classes
	if (starts_with(name, '&'))
	{
		name = name.substring('&'.length)
		is_a_modifier = true
	}

	// support old-school CSS syntax
	if (starts_with(name, '.'))
	{
		name = name.substring('.'.length)
	}

	// if there is a trailing colon in the style class name - trim it
	// (Python people with yaml-alike syntax)
	if (ends_with(name, ':'))
	{
		name = name.substring(0, name.length - ':'.length)
		// throw new Error(`Remove the trailing colon at line: ${original_line}`)
	}

	return { name, is_a_modifier }
}
function parse_node_name(name)
{
	// is it a "modifier" style class
	let is_a_modifier = false

	// detect modifier style classes
	if (starts_with(name, '&'))
	{
		name = name.substring('&'.length)
		is_a_modifier = true
	}

	// support old-school CSS syntax
	if (starts_with(name, '.'))
	{
		name = name.substring('.'.length)
	}

	// if there is a trailing colon in the style class name - trim it
	// (Python people with yaml-alike syntax)
	if (ends_with(name, ':'))
	{
		name = name.substring(0, name.length - ':'.length)
		// throw new Error(`Remove the trailing colon at line: ${original_line}`)
	}

	return { name, is_a_modifier }
}
function parse_node_name ( name ) { // is it a "modifier" style class let is_a_modifier = false // detect modifier style classes if ( starts_with ( name , '&' ) ) { name = name . substring ( '&' . length ) is_a_modifier = true } // support old-school CSS syntax if ( starts_with ( name , '.' ) ) { name = name . substring ( '.' . length ) } // if there is a trailing colon in the style class name - trim it // (Python people with yaml-alike syntax) if ( ends_with ( name , ':' ) ) { name = name . substring ( 0 , name . length - ':' . length ) // throw new Error(`Remove the trailing colon at line: ${original_line}`) } return { name , is_a_modifier } }
parses a style class node name
parses a style class node name