Skip to content

Commit

Permalink
v2.3.23
Browse files Browse the repository at this point in the history
- The option `debug` inserts newlines between the `riot.tag2` parameters and the call is prefixed with the source filename.
- Updated the regex that is used to match tag names, more closer to the HTML specs.
  • Loading branch information
amarcruz committed Mar 8, 2016
1 parent 48381eb commit 1dc60f6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fix [riot#1342](https://github.com/riot/riot/issues/1342), [riot#1636](https://github.com/riot/riot/issues/1636) and request from [dwyl/learn-riot#8](https://github.com/dwyl/learn-riot/issues/8) : Server-Side Rendered Page Fails W3C Check. The new `data-is` attribute is used for scoped styles in addition to `riot-tag` (the later will be removed in compiler v3.x)
- The keyword `defer` in `<script src=file>` avoids that the compiler loads the file, preserving the tag - Requested by [riot#1492](https://github.com/riot/riot/issues/1492) : Stop script tags from being evaluated with serverside `riot.render`. It is removed in client-side compilation because browsers will not load scripts through innerHTML.
- It has changed the character used to hide expressions during the compilation, maybe this fix [riot#1588](https://github.com/riot/riot/issues/1588) : Syntax Error: Invalid character `\0129` (riot+compiler.min).
- The option `debug` inserts newlines between the `riot.tag2` parameters and the call is prefixed with the source filename.
- Removed the unused parameter with the compiled-time brackets from the call to `riot.tag2`.
- Removed support for raw expressions. It is unlikely this feature will be implemented in v2.3.x
- Updated the regex that is used to match tag names, more closer to the HTML specs.
Expand Down
8 changes: 3 additions & 5 deletions dist/es6.compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,10 @@ function mktag (name, html, css, attr, js, opts) {

if (js && js.slice(-1) !== '\n') s = '\n' + s

html = _q(html, 1)
css = _q(css)
attr = _q(attr)

return 'riot.tag2(\'' + name + SQ +
c + html + c + css + c + attr + ', function(opts) {\n' + js + s
c + _q(html, 1) +
c + _q(css) +
c + _q(attr) + ', function(opts) {\n' + js + s
}

function splitBlocks (str) {
Expand Down
8 changes: 3 additions & 5 deletions dist/riot.compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,10 @@ var compile = (function () {

if (js && js.slice(-1) !== '\n') s = '\n' + s

html = _q(html, 1)
css = _q(css)
attr = _q(attr)

return 'riot.tag2(\'' + name + SQ +
c + html + c + css + c + attr + ', function(opts) {\n' + js + s
c + _q(html, 1) +
c + _q(css) +
c + _q(attr) + ', function(opts) {\n' + js + s
}

function splitBlocks (str) {
Expand Down
8 changes: 3 additions & 5 deletions lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,10 @@ function mktag (name, html, css, attr, js, opts) {

if (js && js.slice(-1) !== '\n') s = '\n' + s

html = _q(html, 1)
css = _q(css)
attr = _q(attr)

return 'riot.tag2(\'' + name + SQ +
c + html + c + css + c + attr + ', function(opts) {\n' + js + s
c + _q(html, 1) +
c + _q(css) +
c + _q(attr) + ', function(opts) {\n' + js + s
}

/**
Expand Down
8 changes: 3 additions & 5 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,11 @@ function mktag (name, html, css, attr, js, opts) {
// give more consistency to the output
if (js && js.slice(-1) !== '\n') s = '\n' + s

html = _q(html, 1)
css = _q(css)
attr = _q(attr)

// 2016-01-18: html can contain eols if opts.whitespace=1, fix with q(s,1)
return 'riot.tag2(\'' + name + SQ +
c + html + c + css + c + attr + ', function(opts) {\n' + js + s
c + _q(html, 1) +
c + _q(css) +
c + _q(attr) + ', function(opts) {\n' + js + s
}

/**
Expand Down

0 comments on commit 1dc60f6

Please sign in to comment.