[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Plugins/Litedown/Parser/Passes/ -> Strikethrough.js (source)

   1  function parse()
   2  {
   3      if (text.indexOf('~~') === -1)
   4      {
   5          return;
   6      }
   7  
   8      var m, regexp = /~~[^\x17]+?~~(?!~)/g;
   9      while (m = regexp.exec(text))
  10      {
  11          var match    = m[0],
  12              matchPos = +m['index'],
  13              matchLen = match.length,
  14              endPos   = matchPos + matchLen - 2;
  15  
  16          addTagPair('DEL', matchPos, 2, endPos, 2);
  17          overwrite(matchPos, 2);
  18          overwrite(endPos, 2);
  19      }
  20  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1