Skip to content

Commit

Permalink
Publish v1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerallin committed Oct 19, 2023
1 parent 8ec5ccf commit 815fc5a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ module.exports = function (text_autospace_filter) {

this.process = function (str) {
const document = parse5.parse(str);
const html = treeAdapter.getChildNodes(document)[1];
// Match and insert placeholder tags
searchElement(html, entry).forEach(filter)
for (const html of treeAdapter.getChildNodes(document)) {
// Match and insert placeholder tags
searchElement(html, entry).forEach(filter)
}
// Serialize and return
return parse5.serialize(document);

Expand Down
10 changes: 9 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-filter-text-autospace",
"version": "1.2.4",
"version": "1.2.5",
"description": "A hexo plugin to insert spaces between CJK chars and latin chars.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 815fc5a

Please sign in to comment.