File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -482,11 +482,16 @@ export class TransformContainer extends Container {
482
482
newContent = newContent . replace ( / ( g d o c : [ A - Z 0 - 9 _ - ] + ) ( # [ ^ ' " ) \s ] * ) ? / ig, ( str : string ) => {
483
483
let fileId = str . substring ( 'gdoc:' . length ) . replace ( / # .* / , '' ) ;
484
484
let hash = getUrlHash ( str ) || '' ;
485
- if ( hash && this . globalHeadersMap [ str ] ) {
486
- const idx = this . globalHeadersMap [ str ] . indexOf ( '#' ) ;
487
- if ( idx >= 0 ) {
488
- fileId = this . globalHeadersMap [ str ] . substring ( 'gdoc:' . length , idx ) ;
489
- hash = this . globalHeadersMap [ str ] . substring ( idx ) ;
485
+ if ( hash ) {
486
+ if ( this . globalHeadersMap [ str ] ) {
487
+ const idx = this . globalHeadersMap [ str ] . indexOf ( '#' ) ;
488
+ if ( idx >= 0 ) {
489
+ fileId = this . globalHeadersMap [ str ] . substring ( 'gdoc:' . length , idx ) ;
490
+ hash = this . globalHeadersMap [ str ] . substring ( idx ) ;
491
+ }
492
+ } else {
493
+ const fullLink = str ;
494
+ this . logger . warn ( `In ${ fileName } there is a link to ${ fullLink } which can't be translated into bookmark link` ) ;
490
495
}
491
496
}
492
497
const lastLog = this . localLog . findLastFile ( fileId ) ;
You can’t perform that action at this time.
0 commit comments