File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ async function fetchPageContent(
7373 const selectorsToRemove = [
7474 ".t-navbar" ,
7575 ".t-example-live-link" ,
76- "editsection" ,
76+ ". editsection" ,
7777 "#toc" ,
7878 ] ;
7979 for ( const selector of selectorsToRemove ) {
@@ -305,6 +305,12 @@ async function createPullRequest(
305305 . then ( ( data ) => {
306306 const dom = new JSDOM ( data ) ;
307307 const contentElement = dom . window . document . querySelector ( "main" ) ;
308+ const selectorsToRemove = [ '.sl-anchor-link' ]
309+ for ( const selector of selectorsToRemove ) {
310+ const elements = contentElement ?. querySelectorAll ( selector ) ;
311+ elements ?. forEach ( ( el ) => el . remove ( ) ) ;
312+ }
313+
308314 return contentElement ?. textContent ?. trim ( ) || "" ;
309315 } )
310316 . catch ( ( ) => "" ) ;
You can’t perform that action at this time.
0 commit comments