File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 26
26
# spec-container > emu-annex {
27
27
page-break-before : always;
28
28
}
29
+
30
+ a [data-print-href ]::after {
31
+ content : ' <' attr (href) '>' ;
32
+ color : initial;
33
+ }
Original file line number Diff line number Diff line change @@ -535,6 +535,8 @@ export default class Spec {
535
535
}
536
536
this . log ( 'Propagating effect annotations...' ) ;
537
537
this . propagateEffects ( ) ;
538
+ this . log ( 'Annotating external links...' ) ;
539
+ this . annotateExternalLinks ( ) ;
538
540
this . log ( 'Linking xrefs...' ) ;
539
541
this . _xrefs . forEach ( xref => xref . build ( ) ) ;
540
542
this . log ( 'Linking non-terminal references...' ) ;
@@ -814,6 +816,14 @@ export default class Spec {
814
816
return null ;
815
817
}
816
818
819
+ private annotateExternalLinks ( ) : void {
820
+ for ( const a of this . doc . getElementsByTagName ( 'a' ) ) {
821
+ if ( a . hostname !== '' && a . href !== a . textContent && a . protocol !== 'mailto:' ) {
822
+ a . setAttribute ( 'data-print-href' , '' ) ;
823
+ }
824
+ }
825
+ }
826
+
817
827
private async buildMultipage ( wrapper : Element , commonEles : Element [ ] ) {
818
828
let stillIntro = true ;
819
829
const introEles = [ ] ;
You can’t perform that action at this time.
0 commit comments