Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

AbstractScript.js

Zuletzt modifiziert: 01.05.2026, 11:29 - Dateigröße: 1.61 KiB


 01  /**
 02  * @param {string}  tagName     Name of the tag used by this pass
 03  * @param {string}  syntaxChar  Relevant character used by this syntax
 04  * @param {!RegExp} shortRegexp Regexp used for the short form syntax
 05  * @param {!RegExp} longRegexp  Regexp used for the long form syntax
 06  */
 07  function parseAbstractScript(tagName, syntaxChar, shortRegexp, longRegexp)
 08  {
 09      var pos = text.indexOf(syntaxChar);
 10      if (pos === -1)
 11      {
 12          return;
 13      }
 14   
 15      parseShortForm(pos);
 16      parseLongForm(pos);
 17   
 18      /**
 19      * Parse the long form x^(x)
 20      *
 21      * This syntax is supported by RDiscount
 22      *
 23      * @param {number} pos Position of the first relevant character
 24      */
 25      function parseLongForm(pos)
 26      {
 27          pos = text.indexOf(syntaxChar + '(', pos);
 28          if (pos === -1)
 29          {
 30              return;
 31          }
 32   
 33          var m, regexp = longRegexp;
 34          regexp.lastIndex = pos;
 35          while (m = regexp.exec(text))
 36          {
 37              var match    = m[0],
 38                  matchPos = m.index,
 39                  matchLen = match.length;
 40   
 41              addTagPair(tagName, matchPos, 2, matchPos + matchLen - 1, 1);
 42              overwrite(matchPos, matchLen);
 43          }
 44          if (match)
 45          {
 46              parseLongForm(pos);
 47          }
 48      }
 49   
 50      /**
 51      * Parse the short form x^x and x^x^
 52      *
 53      * This syntax is supported by most implementations that support superscript
 54      *
 55      * @param {number} pos Position of the first relevant character
 56      */
 57      function parseShortForm(pos)
 58      {
 59          var m, regexp = shortRegexp;
 60          regexp.lastIndex = pos;
 61          while (m = regexp.exec(text))
 62          {
 63              var match    = m[0],
 64                  matchPos = m.index,
 65                  matchLen = match.length,
 66                  startPos = matchPos,
 67                  endLen   = (match.charAt(matchLen - 1) === syntaxChar) ? 1 : 0,
 68                  endPos   = matchPos + matchLen - endLen;
 69   
 70              addTagPair(tagName, startPos, 1, endPos, endLen);
 71          }
 72      }
 73  }