Skip to content

Conversation

@happypycode
Copy link

No description provided.

@happypycode happypycode changed the title 防止章节最后套话没有名言做铺垫,增加结尾部分 防止段落最后套话没有名言做铺垫,增加结尾部分 Dec 27, 2020
文章.push(章节);
}
let 排版 = "<div>" + 文章.join("</div><div>") + "</div>";
let 结论 = "  " + "综上所述, x的重要性真是无与伦比, 正如成语说的:缺一不可。有x, 就如".replace('x', 主题).replace('x', 主题) + 随便取一句(名人名言) + "。 "

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文符号后有多余空格

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

恕我眼力不好,也不擅长JavaScript,请告诉我在哪里?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"综上所述, x的重要性真是无与伦比, 正如成语说的:缺一不可。有x, 就如" ——所有中文逗号后面都有个额外空格

index.html Outdated
章节长度 = 章节长度 + 句子.length;
章节 = 章节 + 句子;
// 防止章节最后套话没有名言做铺垫
if ((300 - 章节.length) < 50){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为何不用 章节.length > 250

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作者天命,难以违抗

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为何不用 章节.length > 250

鬼知道...

Copy link

@nonusx nonusx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更换成 ES6 的模板语法更易读

文章.push(章节);
}
let 排版 = "<div>" + 文章.join("</div><div>") + "</div>";
let 结论 = "  " + "综上所述, x的重要性真是无与伦比, 正如成语说的:缺一不可。有x, 就如".replace('x', 主题).replace('x', 主题) + 随便取一句(名人名言) + "。 "
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可替换为:

let 结论 = `综上所述, ${主题}的重要性真是无与伦比, 正如成语说的:缺一不可。有${主题}, 就如${随便取一句(名人名言)}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants