MCPcopy Create free account
hub / github.com/dajie111/nodeseek-userscript / filterEditorContent

Function filterEditorContent

notes.js:1783–1791  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

1781
1782 // 过滤编辑器内容,移除多余的<br>标签
1783 function filterEditorContent(content) {
1784 if (!content) return '';
1785 // 如果内容只包含空的<br>标签,返回空字符串
1786 const cleanContent = content.replace(/<br\s*\/?>/gi, '').trim();
1787 if (!cleanContent || cleanContent === '') {
1788 return '';
1789 }
1790 return content;
1791 }
1792
1793 function clearEditor(){
1794 titleInput.value = '';

Callers 3

restoreLastSelectedNoteFunction · 0.85
renderNotesFunction · 0.85
restoreToVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected