File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,17 @@ function displayModels(models) {
124
124
// Use DOMParser to parse the HTML content
125
125
const parser = new DOMParser ( ) ;
126
126
const doc = parser . parseFromString ( htmlContent , "text/html" ) ;
127
- const firstHeading = doc . querySelector ( "h1" ) ? doc . querySelector ( "h1" ) . textContent : "No Heading" ;
127
+ let firstHeading = doc . querySelector ( "h1" ) ? doc . querySelector ( "h1" ) . textContent : "No Heading" ;
128
128
129
+ // Remove pilcrow character
130
+ firstHeading = firstHeading . replace ( / \W $ / g, '' ) ;
129
131
// Create the link with model name and first heading
130
132
const link = document . createElement ( 'a' ) ;
131
133
const modelBaseName = model . split ( '/' ) . pop ( ) . replace ( '.html' , '' ) ; // Extract base name for display
132
134
link . href = model ; // Use the full model path directly
133
135
link . textContent = `${ firstHeading } ` ; // Include the first heading
134
136
link . className = 'model-link' ; // For CSS styling
135
- link . target = '_blank' ; // Opens link in a new tab
137
+ // link.target = '_blank'; // Opens link in a new tab
136
138
137
139
// Create a list item and append the link
138
140
const li = document . createElement ( 'li' ) ;
You can’t perform that action at this time.
0 commit comments