Skip to content

Commit

Permalink
readOnly bugfix, deprecated warn instead of error
Browse files Browse the repository at this point in the history
  • Loading branch information
z-ZYS-s committed Aug 15, 2015
1 parent 27de5c3 commit bde14c7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/regular-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ return /******/ (function(modules) { // webpackBootstrap

//http://www.w3.org/html/wg/drafts/html/master/single-page.html#void-elements
_.isVoidTag = _.makePredicate("area base br col embed hr img input keygen link menuitem meta param source track wbr r-content");
_.isBooleanAttr = _.makePredicate('selected checked disabled readOnly required open autofocus controls autoplay compact loop defer multiple');
_.isBooleanAttr = _.makePredicate('selected checked disabled readonly required open autofocus controls autoplay compact loop defer multiple');

_.isFalse - function(){return false}
_.isTrue - function(){return true}
Expand Down
4 changes: 2 additions & 2 deletions dist/regular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ _.log = function(msg, type){

//http://www.w3.org/html/wg/drafts/html/master/single-page.html#void-elements
_.isVoidTag = _.makePredicate("area base br col embed hr img input keygen link menuitem meta param source track wbr r-content");
_.isBooleanAttr = _.makePredicate('selected checked disabled readOnly required open autofocus controls autoplay compact loop defer multiple');
_.isBooleanAttr = _.makePredicate('selected checked disabled readonly required open autofocus controls autoplay compact loop defer multiple');

_.isFalse - function(){return false}
_.isTrue - function(){return true}
Expand Down Expand Up @@ -1499,7 +1499,7 @@ walkers.element = function(ast, options){
ref, group, element;

if( tag === 'r-content' ){
_.log('r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)', 'error');
_.log('r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)', 'warn');
return this.$body && this.$body();
}

Expand Down
2 changes: 1 addition & 1 deletion dist/regular.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ _.log = function(msg, type){

//http://www.w3.org/html/wg/drafts/html/master/single-page.html#void-elements
_.isVoidTag = _.makePredicate("area base br col embed hr img input keygen link menuitem meta param source track wbr r-content");
_.isBooleanAttr = _.makePredicate('selected checked disabled readOnly required open autofocus controls autoplay compact loop defer multiple');
_.isBooleanAttr = _.makePredicate('selected checked disabled readonly required open autofocus controls autoplay compact loop defer multiple');

_.isFalse - function(){return false}
_.isTrue - function(){return true}
Expand Down
2 changes: 1 addition & 1 deletion src/walkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ walkers.element = function(ast, options){
ref, group, element;

if( tag === 'r-content' ){
_.log('r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)', 'error');
_.log('r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)', 'warn');
return this.$body && this.$body();
}

Expand Down
4 changes: 2 additions & 2 deletions test/regular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ _.log = function(msg, type){

//http://www.w3.org/html/wg/drafts/html/master/single-page.html#void-elements
_.isVoidTag = _.makePredicate("area base br col embed hr img input keygen link menuitem meta param source track wbr r-content");
_.isBooleanAttr = _.makePredicate('selected checked disabled readOnly required open autofocus controls autoplay compact loop defer multiple');
_.isBooleanAttr = _.makePredicate('selected checked disabled readonly required open autofocus controls autoplay compact loop defer multiple');

_.isFalse - function(){return false}
_.isTrue - function(){return true}
Expand Down Expand Up @@ -1497,7 +1497,7 @@ walkers.element = function(ast, options){
ref, group, element;

if( tag === 'r-content' ){
_.log('r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)', 'error');
_.log('r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)', 'warn');
return this.$body && this.$body();
}

Expand Down

2 comments on commit bde14c7

@leeluolee
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 可以在commit 加上对应的issue id . 比如 ‘fix #46' 可以自动关掉对应issue.

@z-ZYS-s
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这么666,下次试试。

Please sign in to comment.