File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
frontend/src/components/chat/code-engine/style-update Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,7 @@ export class CodeManipulator {
2929 let currentClasses = '' ;
3030
3131 // Look for className in the component line and nearby lines
32- for (
33- let i = componentLineIndex ;
34- i < Math . min ( componentLineIndex + 5 , lines . length ) ;
35- i ++
36- ) {
32+ for ( let i = componentLineIndex ; i < lines . length ; i ++ ) {
3733 const line = lines [ i ] ;
3834 const classNameMatch = line . match ( / c l a s s N a m e \s * = \s * [ " ' ] ( [ ^ " ' ] * ) [ " ' ] / ) ;
3935
@@ -861,17 +857,6 @@ export class CodeManipulator {
861857 // Fix arbitrary values in className attributes that might contain problematic characters
862858 line = this . sanitizeArbitraryValuesInClassNames ( line ) ;
863859
864- // Fix missing closing brackets in JSX tags
865- // Example: <h1 className="class"Text</h1> → <h1 className="class">Text</h1>
866- /*
867- const missingClosingBracketRegex =
868- /(<[a-zA-Z][a-zA-Z0-9]*[^<>]*"[^<>]*)([a-zA-Z0-9])/g;
869- if (missingClosingBracketRegex.test(line)) {
870- line = line.replace(missingClosingBracketRegex, '$1>$2');
871- console.log(`Fixed missing '>' in JSX tag at line ${i + 1}`);
872- }
873- */
874-
875860 // Fix incorrect closing tags
876861 // Look for patterns where closing tag doesn't match opening tag
877862 const openingTagMatch = line . match ( / < ( [ a - z A - Z ] [ a - z A - Z 0 - 9 ] * ) [ ^ < > ] * > [ ^ < ] * / ) ;
You can’t perform that action at this time.
0 commit comments