0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Merge branch 'PRODUCTION' into master

This commit is contained in:
Trevor Buckner
2021-03-01 15:17:40 -05:00
committed by GitHub
3 changed files with 5 additions and 13 deletions

View File

@@ -74,9 +74,9 @@ const CodeEditor = createClass({
}
},
componentWillReceiveProps : function(nextProps){
if(this.codeMirror && nextProps.value !== undefined && this.codeMirror.getValue() != nextProps.value) {
this.codeMirror.setValue(nextProps.value);
componentDidUpdate : function(prevProps) {
if(this.codeMirror && this.codeMirror.getValue() != this.props.value) {
this.codeMirror.setValue(this.props.value);
}
},

View File

@@ -11,18 +11,10 @@ renderer.html = function (html) {
html = html.substring(0, html.lastIndexOf('</div>'));
return `${openTag} ${Markdown(html)} </div>`;
}
//if(html.startsWith('<dt>'))
// if(_.startsWith(_.trim(html), '<style') && _.endsWith(_.trim(html), '</style>')){
// const openTag = html.substring(0, html.indexOf('>')+1);
// html = html.substring(html.indexOf('>')+1);
// html = html.substring(0, html.lastIndexOf('</style>'));
// html = html.replaceAll(/\s(\.[^{]*)/gm, '.V3 $1');
// return `${openTag} ${html} </style>`;
// }
return html;
};
// Don't render {{ Divs or {{ empty Spans on their own line inside a <p>
// Don't wrap {{ Divs or {{ empty Spans in <p> tags
renderer.paragraph = function(text){
let match;
if(text.startsWith('<div') || text.startsWith('</div'))