1+ /* eslint-disable @typescript-eslint/no-unsafe-return */
2+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
3+ /* eslint-disable @typescript-eslint/no-unsafe-call */
4+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
5+ /* eslint-disable @typescript-eslint/explicit-member-accessibility */
6+ /* eslint-disable @typescript-eslint/restrict-template-expressions */
7+ /* eslint-disable @typescript-eslint/member-ordering */
8+ /* eslint-disable no-console */
19import * as fs from 'fs' ;
210import { FileConstant } from '../fileutils/FileConstant' ;
311
@@ -23,12 +31,15 @@ export class HTMLParser {
2331
2432 // Method to replace custom tags
2533 public replaceTags ( namespaceTag : string ) : Map < string , string > {
26- const htmlContentMap = new Map < string , string > ( ) ;
27- htmlContentMap . set ( FileConstant . BASE_CONTENT , this . html ) ;
28- // Use a regular expression to match <omnistudio-input ...>...</omnistudio-input>
29- this . html = this . html . replace ( '<' + namespaceTag , '<' + DEFAULT_NAMESPACE ) . replace ( '</' + namespaceTag , '</' + DEFAULT_NAMESPACE ) ;
30- htmlContentMap . set ( FileConstant . MODIFIED_CONTENT , this . html ) ;
31- console . log ( this . html ) ;
34+ const htmlContentMap = new Map < string , string > ( ) ;
35+ htmlContentMap . set ( FileConstant . BASE_CONTENT , this . html ) ;
36+ // Use a regular expression to match <omnistudio-input> to </omnistudio-input>
37+
38+ this . html = this . html
39+ . replace ( '<' + namespaceTag , '<' + DEFAULT_NAMESPACE )
40+ . replace ( '</' + namespaceTag , '</' + DEFAULT_NAMESPACE ) ;
41+
42+ htmlContentMap . set ( FileConstant . MODIFIED_CONTENT , this . html ) ;
3243 return htmlContentMap ;
3344 }
3445
0 commit comments