File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -703,20 +703,22 @@ <h2 id="problems-title"></h2>
703703 else if ( problem . type === 'util-script' ) icon = '🛠️' ;
704704 else icon = '💻' ;
705705
706+ const displayPath = platform === 'vicutils' ? problem . name : `${ platform } /${ problem . name } ` ;
707+
706708 item . innerHTML = `
707709 <div class="problem-name">
708710 <span class="problem-type-icon">${ icon } </span>
709711 ${ problem . displayName }
710712 </div>
711- <div class="problem-path">${ platform } / ${ problem . name } </div>
713+ <div class="problem-path">${ displayPath } </div>
712714 ` ;
713715
714- if ( problem . hasHtml && problem . htmlFiles . length > 0 ) {
715- if ( platform === ' vicutils' ) {
716- item . onclick = ( ) => window . location . href = `${ platform } /${ problem . name } ` ;
717- } else {
718- item . onclick = ( ) => window . location . href = ` ${ platform } / ${ problem . name } / ${ problem . htmlFiles [ 0 ] . name } ` ;
719- }
716+ if ( platform === 'vicutils' ) {
717+ // For vicutils, link directly to the HTML file
718+ item . onclick = ( ) => window . location . href = `${ platform } /${ problem . name } ` ;
719+ } else if ( problem . hasHtml && problem . htmlFiles . length > 0 ) {
720+ // For leetcode and kattis, maintain the subfolder structure
721+ item . onclick = ( ) => window . location . href = ` ${ platform } / ${ problem . name } / ${ problem . htmlFiles [ 0 ] . name } ` ;
720722 } else {
721723 item . onclick = ( ) => generatePage ( platform , problem ) ;
722724 }
You can’t perform that action at this time.
0 commit comments