Fix infinite loop when postinstall has <br/> in it
This commit is contained in:
@@ -394,8 +394,13 @@ app.filter('markdown2html', function () {
|
||||
tables: true
|
||||
});
|
||||
|
||||
// without this cache, the code runs into some infinite loop (https://github.com/angular/angular.js/issues/3980)
|
||||
var cache = {};
|
||||
|
||||
return function (text) {
|
||||
return converter.makeHtml(text);
|
||||
if (cache[text]) return cache[text];
|
||||
cache[text] = converter.makeHtml(text);
|
||||
return cache[text];
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user