diff --git a/aio/tools/translator/utils.spec.ts b/aio/tools/translator/utils.spec.ts
index 02ceafb58e..b17dde763c 100644
--- a/aio/tools/translator/utils.spec.ts
+++ b/aio/tools/translator/utils.spec.ts
@@ -101,6 +101,21 @@ def`);
`);
});
+ it('拆解单行br', function () {
+ const lines = normalizeLines(`
+ a
+
+ b
+`);
+ expect(lines).eql(`
+ a
+
+
+
+ b
+`);
+ });
+
it('拆解 @a 标记', function () {
const lines = normalizeLines(`
a
diff --git a/aio/tools/translator/utils.ts b/aio/tools/translator/utils.ts
index c48f4fae6e..b0cba68a95 100644
--- a/aio/tools/translator/utils.ts
+++ b/aio/tools/translator/utils.ts
@@ -59,6 +59,8 @@ export function normalizeLines(text: string): string {
text = text.replace(oneLineThTdTagPattern, '\n\n$1<$2$3>\n\n$1$4\n\n$1$2>$5\n\n');
const oneLineCommentPattern = /\n( *)()( *)\n/g;
text = text.replace(oneLineCommentPattern, '\n\n$1$2$3\n\n');
+ const oneLineBrTagPattern = /\n( *)(
)( *)\n/g;
+ text = text.replace(oneLineBrTagPattern, '\n\n$1$2$3\n\n');
const atTagCommentPattern = /\n( *)({@a.*})( *)\n/g;
text = text.replace(atTagCommentPattern, '\n\n$1$2$3\n\n');
const oneLineClosedTagPattern = /\n( *)<(hr|p)(\/?)>( *)\n/g;