protected updateHTML()

in src/BaseHTMLGenerator.ts [62:92]


    protected updateHTML() {

        let customStyles: string = this.getCustomStyles();
        let itemImage: string = this.getItemImage();
        let categories: string = this.getCategories();
        let tags: string = this.getTags();
        let projectDetails: string = this.getProjectDetails();
        let preview: string = this.getPreviewDetails();

        // This array hold the key-value relations
        let dataMapArray: DataKeyValuePair[] = [
            new DataKeyValuePair("${image}", itemImage),
            new DataKeyValuePair("${cssPath}", this.cssPath),
            new DataKeyValuePair("${displayName}", this.packageData.displayName),
            new DataKeyValuePair("${publisher}", this.packageData.publisher),
            new DataKeyValuePair("${publisher}", this.packageData.publisher),
            new DataKeyValuePair("${description}", this.packageData.description),
            new DataKeyValuePair("${markdownHtmlOutput}", this.markdownHtmlOutput),
            new DataKeyValuePair("${categories}", categories),
            new DataKeyValuePair("${version}", this.packageData.version),
            new DataKeyValuePair("${customStyle}", customStyles),
            new DataKeyValuePair("${tags}", tags),
            new DataKeyValuePair("${projectDetails}", projectDetails),
            new DataKeyValuePair("${preview}", preview),
        ]

        //Replace the values in HTML template using the dataMapArray
        for (var item of dataMapArray) {
            this.html = this.html.replace(item.placeholder, item.value);
        }
    }