Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
news-harvester
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Back End
news-harvester
Commits
1cbbc634
Commit
1cbbc634
authored
Aug 06, 2026
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: edit content html build
parent
edea36c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
push.js
scripts/push.js
+6
-1
No files found.
scripts/push.js
View file @
1cbbc634
...
...
@@ -206,8 +206,10 @@ function mdToHtmlBody(md, titleEn, assetIdByFilename) {
let
alt
=
''
;
if
(
i
+
1
<
lines
.
length
)
{
const
cap
=
lines
[
i
+
1
].
trim
().
match
(
/^
\*(
.+
)\*
$/
);
if
(
cap
)
{
alt
=
cap
[
1
];
i
++
;
}
if
(
cap
)
{
alt
=
cap
[
1
]
.
trim
()
;
i
++
;
}
}
// Placeholder alt "alt" carries no real caption — drop the annotation.
if
(
alt
===
'alt'
)
alt
=
''
;
const
assetId
=
assetIdByFilename
?
assetIdByFilename
.
get
(
filename
)
:
null
;
const
src
=
assetId
!=
null
?
`asset://
${
assetId
}
`
:
''
;
if
(
alt
)
{
...
...
@@ -217,6 +219,9 @@ function mdToHtmlBody(md, titleEn, assetIdByFilename) {
}
i
++
;
continue
;
}
// Skip the "(无图片)" placeholder harvest.js writes when an article has
// no images — it should not appear in the pushed HTML body.
if
(
trimmed
===
'(无图片)'
)
{
i
++
;
continue
;
}
// Blockquote > text
if
(
trimmed
.
match
(
/^>
\s
*
(
.*
)
$/
))
{
flush
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment