Changed doctype to be "rt"
This commit is contained in:
parent
1962bb4abf
commit
1e44367bcd
|
@ -242,7 +242,7 @@ function convertHtmlToReact(node, context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractDefinesFromJSXTag(html, defines) {
|
function extractDefinesFromJSXTag(html, defines) {
|
||||||
html = html.replace(/\<\!doctype jsx\s*(.*?)\s*\>/i, function(full, reqStr) {
|
html = html.replace(/\<\!doctype rt\s*(.*?)\s*\>/i, function(full, reqStr) {
|
||||||
var match = true;
|
var match = true;
|
||||||
while (match) {
|
while (match) {
|
||||||
match = false;
|
match = false;
|
||||||
|
@ -301,7 +301,7 @@ function convertFile(source, target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = fs.readFileSync(source).toString();
|
var html = fs.readFileSync(source).toString();
|
||||||
if (!html.match(/\<\!doctype jsx/i)) {
|
if (!html.match(/\<\!doctype rt/i)) {
|
||||||
throw new Error('invalid file, missing header');
|
throw new Error('invalid file, missing header');
|
||||||
}
|
}
|
||||||
var js = convertTemplateToReact(html);
|
var js = convertTemplateToReact(html);
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<!doctype jsx>
|
<!doctype rt>
|
||||||
<div>
|
<div>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE jsx>
|
<!DOCTYPE rt>
|
||||||
<div rt-scope="{value:'event did not happen because onClick not called'} as data"
|
<div rt-scope="{value:'event did not happen because onClick not called'} as data"
|
||||||
onMouseDown="(evt) => data.value = 'event did happen though it should not'"
|
onMouseDown="(evt) => data.value = 'event did happen though it should not'"
|
||||||
onClick="() => data.value = 'event did happen though it should not'">
|
onClick="() => data.value = 'event did happen though it should not'">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE jsx>
|
<!DOCTYPE rt>
|
||||||
<p>
|
<p>
|
||||||
<div rt-repeat="items in this.props.things">
|
<div rt-repeat="items in this.props.things">
|
||||||
<span style="width:auto;line-height: 5px;"
|
<span style="width:auto;line-height: 5px;"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE jsx>
|
<!DOCTYPE rt>
|
||||||
<div>
|
<div>
|
||||||
<div rt-scope="['a','b','c'] as items">
|
<div rt-scope="['a','b','c'] as items">
|
||||||
<span rt-repeat="item in items">Item:#{itemIndex} = {item}</span>
|
<span rt-repeat="item in items">Item:#{itemIndex} = {item}</span>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!doctype jsx>
|
<!doctype rt>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div style= "position: relative; textAlign: center;
|
<div style= "position: relative; textAlign: center;
|
||||||
|
|
Loading…
Reference in New Issue