These changes are breaking compatibility with SHP 1
- All functional characters can be escaped with a
\ - Automatic detection whether a tag is scoped. Tags are prefixed with a
$.$body { $img[src="path/to/img.png"] // not scoped $script[src="path/to/script.js"] // scoped } - Standard preformatted tags are detected automatically. To explicitly enable preformatted feature use a
%prefix. Content of preformatted tags (both auto-detected and explicit) is not parsed as SHP.$pre { $some[shp=code] {that is ignored\} until unescaped close bracked is encountered } %style { // explicit preform. html {margin: 0\} } - Add an option to add a space after otherwise not preformatted tags with a
_suffix. By default the tags are not separated by spaces.$b_ {Hello} world // <b>hello</b> world $b {Ban} ana // <b>Ban</b>ana - Automatically escape HTML functional characters
$p {In <p> you can define paragraphs} // <p>In <p> you can define paragraphs</p>
- Restore equal sign
=in attributes without quick prefix$img[#BannerLogo src="path/to/img.png"] - Literals are now exclusively created with
"double quotes - Quick flags can be set as true or false with
+and!prefixes respectively$div[+hidden] // hidden = true $video[!controls] // controls = false
- Functions now accept variables for easier formatting, example
@define[#MySection ?sectionID] { $section[#?[sectionID]] } - New pair of functions was added:
@slot/@insert, define a slot once and insert into it many times, exampleWhen no content is inserted into the slot there should be a way to provide a default value$head {@slot[#head]} @insert[#head] {$meta[charset='utf-8']} @insert[#head] {$title {My webpage}}