Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
heading(text, level) {
if (!this.options.headerIds) {
return `${text}`;
}
const transformOption = this.options.modifyAnchors;
let id = anchorId(stripHTML(text), transformOption);
const headingId = this._headingId;
// Add a number after id if repeated
if (headingId[id]) {
id += `-${headingId[id]++}`;
} else {
headingId[id] = 1;
}
// add headerlink
return `<a title="${stripHTML(text)}" class="headerlink" href="#${id}"></a>${text}`;
}
.map(post => {
const ret = pick(post, searchProps)
ret.content = stripHTML(
ret.content
.replace(//g, '')
.replace(//g, '')
)
return ret
})
}) : [],
renderer.heading = (text, level) => {
const id = uslug(stripHTML(text));
return `${text}<a title="${stripHTML(text)}" class="headerlink" href="#${id}"></a>`;
};
export function minify (str) {
return stripHTML(str).trim().replace(/\s+/g, ' ')
}
function minify(str) {
return util.stripHTML(str).trim().replace(/\n/g, ' ').replace(/\s+/g, ' ');
}
function postMapper(post) {
hexo.extend.filter.register('after_post_render', function(data) {
var content = data.content;
if (config.exclude_codeblock) content = content.replace(/<pre>.*?<\/pre>/g, '');
data.length = stripHTML(content).replace(/\r?\n|\r/g, '').replace(/\s+/g, '').length;
}, 0);
}</pre>
minify = str => util.stripHTML(str).trim().replace(/\n/g, ' ').replace(/\s+/g, ' '),
getProps = ref => Object.getOwnPropertyNames(ref).filter(item => ref[item]),
function minify(str) {
return util.stripHTML(str).trim().replace(/\n/g, ' ').replace(/\s+/g, ' ')
.replace(/&#x([\da-fA-F]+);/g, function (match, hex) {
return String.fromCharCode(parseInt(hex, 16));
})
.replace(/&#([\d]+);/g, function (match, dec) {
return String.fromCharCode(dec);
});
}
function postMapper(post) {