JSFiddle - React, Tailwind, and code Playground

by salitrapraveen

HTML

<pre>
===============================================================================

SSR Number: SUN-67057     System Software Request (SSR)         Date: 12-20-13

Related ECR: No

Requested by:             Username:               Dept:       Work Phone#      
Indrajeet Harsh           iharsh                  TLS         (804)217-6410 1681

===============================================================================

Approval is Required: 
https://ubatchda01.cuc.com/cgi-bin/alg/lola-qa-approval.cgi

===============================================================================

Install by date: 12-20-13

===============================================================================

The following installations are for host: ulolaadminda02

===============================================================================

OTHER files are to be processesed into the following directory:

- Location:    lola
- Owner/Group: bin bin
- Protection:  -r--r--r--

Function       Filename(s)                      Size in        Checksum:       
Code:                                           Bytes:

modify         installapp.properties            1379           08296 2         

===============================================================================

The content of the install.properties file...

CSS

pre {
    font-family: sans-serif;
    font-size: 0.8em;
    border: 1px solid black;
    padding: 10px;
}

p.bold {
 color: red;
    font-weight: bold;
    padding: 0;
    margin: 0;
    
}
}

JavaScript

var lines = $("pre").text().split("\n");
var newLines = [];
$.each(lines, function(n, elem) {
    var me = '';
    if(elem.indexOf('The following installations are for host: ') > -1 || elem.indexOf('- Location:')> -1 || elem.indexOf('domain=')> -1)
    {
        me = '<p class="bold">'+elem+'</p>';    
    }
    else
    {
     me = elem;   
    }
    newLines.push(me);
});

$("pre").html(newLines.join('\n'));