File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ module.exports = function (src) {
5858 // check if relative links are valid
5959 links && links . forEach ( link => {
6060 const shortname = link
61- . replace ( / # [ \w - ] * $ / , '' )
61+ . replace ( / # . * $ / , '' )
6262 . replace ( / \. h t m l $ / , '.md' )
6363 const filename = shortname
6464 . replace ( / \/ $ / , '/README.md' )
@@ -69,7 +69,7 @@ module.exports = function (src) {
6969 const dir = path . dirname ( this . resourcePath )
7070 const file = path . resolve ( dir , filename )
7171 const altfile = altname !== filename ? path . resolve ( dir , altname ) : null
72- if ( ! fs . existsSync ( file ) && ( altfile && ! fs . existsSync ( altfile ) ) ) {
72+ if ( ! fs . existsSync ( file ) && ( ! altfile || ! fs . existsSync ( altfile ) ) ) {
7373 this . emitWarning (
7474 new Error (
7575 `\nFile for relative link "${ link } " does not exist.\n` +
You can’t perform that action at this time.
0 commit comments