mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 07:42:39 +00:00
Improved the html parsing slightly
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
- Updated the welcome text
|
- Updated the welcome text
|
||||||
- Added in a much better Error page
|
- Added in a much better Error page
|
||||||
- If you visit a deleted brew, it will now remove it from your recent list. (Thanks u/sIllverback!)
|
- If you visit a deleted brew, it will now remove it from your recent list. (Thanks u/sIllverback!)
|
||||||
|
- Improved parsing of embedded html text in brews. (Thanks u/com-charizard!)
|
||||||
|
-
|
||||||
|
|
||||||
### Friday, 29/07/2016 - v2.2.7
|
### Friday, 29/07/2016 - v2.2.7
|
||||||
- Adding in descriptive note blocks. (Thanks calculuschild!)
|
- Adding in descriptive note blocks. (Thanks calculuschild!)
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ var EditPage = React.createClass({
|
|||||||
},
|
},
|
||||||
savedBrew : null,
|
savedBrew : null,
|
||||||
|
|
||||||
|
test : ()=>{
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
componentDidMount: function(){
|
componentDidMount: function(){
|
||||||
|
|
||||||
console.log('getting here');
|
console.log('getting here');
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var renderer = new Markdown.Renderer();
|
|||||||
|
|
||||||
//Processes the markdown within an HTML block if it's just a class-wrapper
|
//Processes the markdown within an HTML block if it's just a class-wrapper
|
||||||
renderer.html = function (html) {
|
renderer.html = function (html) {
|
||||||
if(_.startsWith(_.trim(html), '<div class=') && _.endsWith(_.trim(html), '</div>')){
|
if(_.startsWith(_.trim(html), '<div') && _.endsWith(_.trim(html), '</div>')){
|
||||||
var openTag = html.substring(0, html.indexOf('>')+1);
|
var openTag = html.substring(0, html.indexOf('>')+1);
|
||||||
html = html.substring(html.indexOf('>')+1);
|
html = html.substring(html.indexOf('>')+1);
|
||||||
html = html.substring(0, html.lastIndexOf('</div>'));
|
html = html.substring(0, html.lastIndexOf('</div>'));
|
||||||
|
|||||||
Reference in New Issue
Block a user