User:Hippietrail/softtemplates.js

Hello, you have come here looking for the meaning of the word User:Hippietrail/softtemplates.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Hippietrail/softtemplates.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Hippietrail/softtemplates.js in singular and plural. Everything you need to know about the word User:Hippietrail/softtemplates.js you have here. The definition of the word User:Hippietrail/softtemplates.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Hippietrail/softtemplates.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
/*
<pre>
*/

// soft CSS templates
function softTemplates() {

  // TODO: IF getElementById('editform') THEN process DIV CLASS=previewnote
  // TODO: ELSE process DIV ID=bodyContent
  var theDiv;

  theDiv = document.getElementById('bodyContent');
  
  var dh = theDiv.innerHTML;
  var newdh = dh;
  var re;

  // something straightforward
  re = new RegExp('foo', 'gm');
  newdh = newdh.replace(re, "xx foo xx");

  // something real
  re = new RegExp('(?:<dl>\\n<dd>|<p>)<i>See also:? (<a href=\"https://dictious.com/en/*\" title=\"*\">*</a>)</i>(?:</dd>\\n</dl>|</p>)', 'gm');
  newdh = newdh.replace(re, "xx see xx");

  // something else real
//  re = new RegExp('(?:\\(<i>|<i>\\()(*)(?:<\/i>\\)|\\)<\/i>):?', 'gm');
  re = new RegExp('<i>(*)<\/i>', 'g');
  newdh = newdh.replace(re, "xx italbrac xx");

  // something else straightforward
  re = new RegExp('bar', 'gm');
  newdh = newdh.replace(re, "xx bar xx");

/////////////////
//  var oldbc = document.getElementById('bodyContent');
//  var newbc = document.createElement('div');
//  oldbc.parentNode.insertBefore(newbc, oldbc);
//  oldbc.parentNode.insertBefore(document.createElement('hr'), oldbc);
////  oldbc.style.display = 'none';
//  newbc.innerHTML = newbch;
  theDiv.innerHTML = newdh;
/////////////////
}

/*
</pre>
*/