mirror of
https://github.com/wassname/talk.git
synced 2026-07-21 12:51:03 +08:00
Fix normalizer
This commit is contained in:
@@ -17,15 +17,5 @@ export function htmlNormalizer(htmlInput) {
|
||||
str = str
|
||||
.replace(/<em>/g, '<i>') // IE
|
||||
.replace(/<\/em>/g, '</i>'); // IE
|
||||
|
||||
// Remove first opening tag, otherwise
|
||||
// with the following transformation below
|
||||
// we might add an unintended first empty line.
|
||||
if (str.startsWith('<div>')) {
|
||||
str = str.replace('<div>', '');
|
||||
}
|
||||
|
||||
// Normalize <div>s to <br>.
|
||||
// return str.replace(/<div>/g, '<br>').replace(/<\/div>/g, '');
|
||||
return str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user