Skip to content

Commit 2eba27e

Browse files
committed
Avoid bug in 2.0.md
1 parent f7fbac5 commit 2eba27e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/md2html/md2html.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ for (let l in lines) {
265265
}
266266

267267
if (line.indexOf('<a name="')>=0) {
268-
line = line.replace(' name=',' id=');
268+
if (line.indexOf('<a name="parameterAllowEmptyValue"/>')>=0)
269+
// fix syntax error in 2.0.md
270+
line = line.replace('<a name="parameterAllowEmptyValue"/>','<a id="parameterAllowEmptyValue"></a>');
271+
else
272+
line = line.replace('<a name=','<a id=');
269273
line = line.replace('"></a>','" class="logo"></a>');
270274
}
271275

0 commit comments

Comments
 (0)