diff --git a/src/reactTemplates.js b/src/reactTemplates.js index dae0cd1..5276048 100644 --- a/src/reactTemplates.js +++ b/src/reactTemplates.js @@ -242,7 +242,7 @@ function convertHtmlToReact(node, context) { } 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; while (match) { match = false; @@ -301,7 +301,7 @@ function convertFile(source, target) { } 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'); } var js = convertTemplateToReact(html); diff --git a/test/data/div.rt b/test/data/div.rt index 5ab1014..b7c24b3 100644 --- a/test/data/div.rt +++ b/test/data/div.rt @@ -1,3 +1,3 @@ - +