mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-28 20:28:52 +03:00
Test memoize enhanceContent
This commit is contained in:
parent
f56a44ac97
commit
32bf258bbf
1 changed files with 3 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
import emojifyText from './emojify-text';
|
||||
import mem from './mem';
|
||||
|
||||
const fauxDiv = document.createElement('div');
|
||||
const whitelistLinkClasses = ['u-url', 'mention', 'hashtag'];
|
||||
|
||||
function enhanceContent(content, opts = {}) {
|
||||
function _enhanceContent(content, opts = {}) {
|
||||
const { emojis, postEnhanceDOM = () => {} } = opts;
|
||||
let enhancedContent = content;
|
||||
const dom = document.createElement('div');
|
||||
|
@ -250,6 +251,7 @@ function enhanceContent(content, opts = {}) {
|
|||
|
||||
return enhancedContent;
|
||||
}
|
||||
const enhanceContent = mem(_enhanceContent);
|
||||
|
||||
const defaultRejectFilter = [
|
||||
// Document metadata
|
||||
|
|
Loading…
Reference in a new issue