mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Improved the html parsing slightly
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
- Updated the welcome text
|
||||
- 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!)
|
||||
- Improved parsing of embedded html text in brews. (Thanks u/com-charizard!)
|
||||
-
|
||||
|
||||
### Friday, 29/07/2016 - v2.2.7
|
||||
- Adding in descriptive note blocks. (Thanks calculuschild!)
|
||||
|
||||
@@ -52,6 +52,10 @@ var EditPage = React.createClass({
|
||||
},
|
||||
savedBrew : null,
|
||||
|
||||
test : ()=>{
|
||||
|
||||
},
|
||||
|
||||
componentDidMount: function(){
|
||||
|
||||
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
|
||||
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);
|
||||
html = html.substring(html.indexOf('>')+1);
|
||||
html = html.substring(0, html.lastIndexOf('</div>'));
|
||||
|
||||
Reference in New Issue
Block a user