diff --git a/aio/content/guide/styleguide.md b/aio/content/guide/styleguide.md
index 205b7b118d..7babc9eac4 100644
--- a/aio/content/guide/styleguide.md
+++ b/aio/content/guide/styleguide.md
@@ -4662,4 +4662,5 @@ Useful tools and tips for Angular.
Back to top
+
回到顶部
diff --git a/aio/content/guide/template-syntax.md b/aio/content/guide/template-syntax.md
index c20537bdac..172a7ec389 100644
--- a/aio/content/guide/template-syntax.md
+++ b/aio/content/guide/template-syntax.md
@@ -1520,7 +1520,7 @@ Here's how the table renders:
Six
-
+
六列
|
diff --git a/aio/tools/translator/bin/translate-one.ts b/aio/tools/translator/bin/translate-one.ts
index ee6b2252d4..a8ac6b1e82 100644
--- a/aio/tools/translator/bin/translate-one.ts
+++ b/aio/tools/translator/bin/translate-one.ts
@@ -3,5 +3,5 @@
import { dirs } from '../dirs';
import { translateFile } from '../translate';
-const filename = 'guide/router.md';
+const filename = 'guide/template-syntax.md';
translateFile(__dirname + '/../../../../../content-en/' + filename, dirs.content + filename);
diff --git a/aio/tools/translator/utils.spec.ts b/aio/tools/translator/utils.spec.ts
index 9955dfe413..2c057336a8 100644
--- a/aio/tools/translator/utils.spec.ts
+++ b/aio/tools/translator/utils.spec.ts
@@ -279,6 +279,18 @@ ng generate directive highlight
`);
});
+
+ it('拆解任意位置的 ', function () {
+ expect(normalizeLines(`
+
abc |
+`)).eql(`
+
+
+ abc |
+
+
+`);
+ });
it('拆解独行的 li', function () {
expect(normalizeLines(`
diff --git a/aio/tools/translator/utils.ts b/aio/tools/translator/utils.ts
index c1d729049c..614cd3fd87 100644
--- a/aio/tools/translator/utils.ts
+++ b/aio/tools/translator/utils.ts
@@ -60,6 +60,8 @@ export function normalizeLines(text: string): string {
text = text.replace(oneLineCommentPattern, '\n\n$1$2$3\n');
const oneLineBrTagPattern = /\n( *)(
)( *)(?=\n)/g;
text = text.replace(oneLineBrTagPattern, '\n\n$1$2$3\n');
+ const backToTopPattern = /\n( *)(Back to top<\/a>)( *)(?=\n)/g;
+ text = text.replace(backToTopPattern, '\n\n$1$2$3\n');
const atTagCommentPattern = /\n( *)({@a.*})( *)(?=\n)/g;
text = text.replace(atTagCommentPattern, '\n\n$1$2$3\n');
const oneLineClosedTagPattern = /\n( *)<(hr)(\/?)>( *)(?=\n)/g;
@@ -67,6 +69,9 @@ export function normalizeLines(text: string): string {
const multiLinePairedTagPattern = /\n( *)<(header)( *[^>\n]*)>\n*(.*?)\n*( *)<\/\2>( *)(?=\n)/g;
text = text.replace(multiLinePairedTagPattern, '\n\n$1<$2$3>\n\n$4\n\n$5$2>$6\n');
+ const trTagPattern = /( *)(\n]*>)(.*)(<\/tr>)/g;
+ text = text.replace(trTagPattern, '\n\n$1$2\n\n$1 $3\n\n$1$4\n\n');
+
const blockTagPattern = /\n( *)<(\/?)(td|th|div|code-example|code-tabs|h\d+|p|tr)\b( *[^>\n]*)>( *)(?=\n)/g;
text = text.replace(blockTagPattern, '\n\n$1<$2$3$4>$5\n');