Windy31's Profile, Net Worth, Age, Height, Relationships, FAQs
<\/p>/g, '
'); processedData = processedData.replace(/<\/p>
<\/p>$/, '
<\/p>'); //Encapsulate img and figcaption tags inside figure tag var imgMatches = processedData.matchAll(/(()(.*?<\/figcaption>)*)/g); var imgMatchesArr = Array.from(imgMatches) imgMatchesArr.forEach(function(imgMatch) { if (imgMatch[3] && imgMatch[3].startsWith("' + imgMatch[0] + ''); } }); return processedData } function preProcessData(intermediateHTMLData) { intermediateHTMLData = intermediateHTMLData.replace(/(\n)|(\n)/g, ''); intermediateHTMLData = intermediateHTMLData.replace(/()+/g, ''); return intermediateHTMLData; } function getContentBlocksArray(intermediateHTMLData) { var contentBlocksArray = intermediateHTMLData.split(/\n|/); var newContentBlocksArray = []; for (var z = 0; z < contentBlocksArray.length; z++) { var oneBlockElementData = contentBlocksArray[z]; if (oneBlockElementData.indexOf(' -1) { var lastElementIndex = oneBlockElementData.lastIndexOf(" 0) { newContentBlocksArray.push(afterList); } } else if(oneBlockElementData.indexOf('') > -1) { var lastElementIndex = oneBlockElementData.lastIndexOf("") + "".length; var table = oneBlockElementData.substring(0, lastElementIndex); var afterTable = oneBlockElementData.substring(lastElementIndex); newContentBlocksArray.push(table); if (afterTable.length > 0) { newContentBlocksArray.push(afterTable); } } else { newContentBlocksArray.push(oneBlockElementData); } } return newContentBlocksArray; } function handleHeaderElements(oneBlockElementData) { while (oneBlockElementData.indexOf(' -1) { var index = oneBlockElementData.indexOf('', ''); oneBlockElementData = '' + oneBlockElementData + ''; } return oneBlockElementData; } function handleBlockquoteElements(oneBlockElementData) { while (oneBlockElementData.indexOf('') > -1) { oneBlockElementData = oneBlockElementData.replace('', ''); oneBlockElementData = '' + oneBlockElementData + ''; } return oneBlockElementData; } function handleFigCaptionElements(oneBlockElementData) { while (oneBlockElementData.indexOf('') > -1) { oneBlockElementData = oneBlockElementData.replace('', ''); oneBlockElementData = '' + oneBlockElementData + ''; } return oneBlockElementData; } function handleAlignElements(oneBlockElementData) { while (oneBlockElementData.indexOf(' -1) { var indexStart = oneBlockElementData.indexOf(''); var alignVal = oneBlockElementData.substring(indexStart, indexEnd); oneBlockElementData = oneBlockElementData.replace('', ''); oneBlockElementData = '
' + oneBlockElementData + '
'; } return oneBlockElementData; } function handleListElements(oneBlockElementData) { if (oneBlockElementData.indexOf(' -1) { var elementAfterListData = oneBlockElementData; var myRegexp = /(.*?)/g; var listElemArr = []; var match; while ((match = myRegexp.exec(oneBlockElementData)) !== null) { var elem = []; elem['type'] = match[2]; elem['data'] = match[1] listElemArr.push(elem); elementAfterListData = elementAfterListData.replace(match[0], ''); } var currentListType = listElemArr[0].type; var listData = '<' + currentListType + '>'; for (let i = 0; i < listElemArr.length; i++) { listElem = listElemArr[i]; if (listElem.type === currentListType) { listData += '' + elementAfterListData + '
'; } } oneBlockElementData = listData + elementAfterListData; } return oneBlockElementData; } function handleTableElements(oneBlockElementData) { if (oneBlockElementData.indexOf('') > -1) { var elementAfterTableData = oneBlockElementData; var myRegexp = /(.*?)('; } } oneBlockElementData = tableData + elementAfterTableData; } // while placeholder tr is present var index = oneBlockElementData.indexOf(''); while(index >= 0) { // get substring before tr placeholder var strBeforePlaceholder = oneBlockElementData.substring(0, index); // remove the current occurance of placeholder tr oneBlockElementData = strBeforePlaceholder + oneBlockElementData.substring(index + ''.length); // find first opening td, and add tr tags var firstClosingTdTagBeforeTr = strBeforePlaceholder.lastIndexOf(''); if(firstClosingTdTagBeforeTr > 0) { firstClosingTdTagBeforeTr += ''.length; if(firstClosingTdTagBeforeTr >= 0) { oneBlockElementData = oneBlockElementData.substring(0, firstClosingTdTagBeforeTr) + 'ncG1vNJzZmivmaC2b7%2FPqKmtq5uasqWtjZympmeppMK1wcGeZrCgn2K2tHnWoqWdsWNm