0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 21:52:43 +00:00

Experimenting with validation more

This commit is contained in:
Scott Tolksdorf
2016-09-12 09:58:32 -04:00
parent 9eb26a95f3
commit cd2337ff2c
2 changed files with 38 additions and 38 deletions

View File

@@ -75,6 +75,20 @@ var BrewRenderer = React.createClass({
},
renderPage : function(pageText, index){
var html = Markdown.render(pageText)
var checkHTML = function(html) {
var doc = document.createElement('div');
doc.innerHTML = html;
console.log(doc.innerHTML);
return ( doc.innerHTML === html );
}
console.log('page', index, checkHTML(html));
return <div className='phb' id={`p${index + 1}`} dangerouslySetInnerHTML={{__html:Markdown.render(pageText)}} key={index} />
},
@@ -82,6 +96,8 @@ var BrewRenderer = React.createClass({
var pages = this.props.text.split('\\page');
this.totalPages = pages.length;
//TESTING VALIDATION
try{
var temp = Markdown.validate(this.props.text);