Home
last modified time | relevance | path

Searched refs:match (Results 1 – 25 of 128) sorted by relevance

123456

/dokuwiki/vendor/simplepie/simplepie/src/Parse/
H A DDate.php683 if (preg_match($pcre, $date, $match)) {
685 $year = (int) $match['year'];
686 $month = isset($match['month']) ? (int) $match['month'] : 1;
687 $day = isset($match['day']) ? (int) $match['day'] : 1;
688 $hour = isset($match['hour']) ? (int) $match['hour'] : 0;
689 $minute = isset($match['minute']) ? (int) $match['minute'] : 0;
690 $second = isset($match['second']) ? (int) $match['second'] : 0;
691 …$second_fraction = isset($match['second_fraction']) ? ((int) $match['second_fraction']) / (10 ** s…
692 $tz_sign = ($match['tz_sign'] ?? '') === '-' ? -1 : 1;
693 $tz_hour = isset($match['tz_hour']) ? (int) $match['tz_hour'] : 0;
[all …]
/dokuwiki/inc/Parsing/ParserMode/
H A DTable.php54 public function handle($match, $state, $pos, Handler $handler) argument
61 if (trim($match) == '^') {
76 if (trim($match) != '') {
77 $handler->addCall('cdata', [$match], $pos);
82 if ($match == ' ') {
83 $handler->addCall('cdata', [$match], $pos);
84 } elseif (preg_match('/:::/', $match)) {
85 $handler->addCall('rowspan', [$match], $pos);
86 } elseif (preg_match('/\t+/', $match)) {
87 $handler->addCall('table_align', [$match], $pos);
[all …]
H A DExternallink.php83 public function handle($match, $state, $pos, Handler $handler) argument
85 if (str_starts_with($match, '<') && str_ends_with($match, '>')) {
86 $this->handleAngleAutolink($match, $pos, $handler);
88 $this->handleBareUrl($match, $pos, $handler);
99 protected function handleAngleAutolink(string $match, int $pos, Handler $handler): void argument
101 if (preg_match('/\s/', $match)) {
102 $handler->addCall('cdata', [$match], $pos);
105 $url = substr($match, 1, -1);
115 protected function handleBareUrl(string $match, int $pos, Handler $handler): void argument
117 $url = $match;
H A DMedia.php24 public function handle($match, $state, $pos, Handler $handler) argument
26 $p = self::parseMedia($match);
39 * @param string $match The full media syntax (e.g. {{image.png?200|title}})
42 public static function parseMedia($match) argument
45 $link = preg_replace(['/^\{\{/', '/\}\}$/u'], '', $match);
H A DGfmMedia.php55 public function handle($match, $state, $pos, Handler $handler) argument
57 $sep = strpos($match, '](');
58 $alt = substr($match, 2, $sep - 2);
59 $inside = trim(substr($match, $sep + 2, -1));
H A DListblock.php51 public function handle($match, $state, $pos, Handler $handler) argument
56 $handler->addCall('list_open', [$match], $pos);
65 $handler->addCall('list_item', [$match], $pos);
68 $handler->addCall('cdata', [$match], $pos);
H A DGfmHeader.php57 public function handle($match, $state, $pos, Handler $handler) argument
59 $level = strspn($match, '#');
60 $title = trim(substr($match, $level));
H A DCamelcaselink.php26 public function handle($match, $state, $pos, Handler $handler) argument
28 $handler->addCall('camelcaselink', [$match], $pos);
H A DFootnote.php59 public function handle($match, $state, $pos, Handler $handler) argument
66 $handler->addCall('cdata', [$match], $pos);
77 $handler->addCall('cdata', [$match], $pos);
89 $handler->addCall('cdata', [$match], $pos);
H A DGfmListblock.php120 public function handle($match, $state, $pos, Handler $handler) argument
122 $items = $this->parseItems($match);
124 $handler->addCall('cdata', [$match], $pos);
165 $handler->addCall('list_close', [], $pos + strlen($match));
188 * @param string $match the raw special-pattern match (starts with \n)
191 protected function parseItems($match) argument
193 $stripped = ltrim($match, "\n");
194 $offsetBase = strlen($match) - strlen($stripped);
H A DMultiplyentity.php30 public function handle($match, $state, $pos, Handler $handler) argument
32 preg_match_all('/\d+/', $match, $matches);
H A DWindowssharelink.php34 public function handle($match, $state, $pos, Handler $handler) argument
36 $handler->addCall('windowssharelink', [$match, null], $pos);
/dokuwiki/inc/Parsing/
H A DHandler.php133 * @param string $match The matched text
139 public function handleToken($modeName, $match, $state, $pos, $originalModeName = '') argument
147 return $this->plugin($match, $state, $pos, $plugin);
152 return $this->modeObjects[$modeName]->handle($match, $state, $pos, $this);
230 * @param string $match matched syntax
232 public function addPluginCall($plugin, $args, $state, $pos, $match) argument
234 $call = ['plugin', [$plugin, $args, $state, $match], $pos];
272 * @param string $match matched syntax
279 public function plugin($match, $state, $pos, $pluginname) argument
281 $data = [$match];
[all …]
/dokuwiki/inc/Parsing/Handler/
H A DLists.php16 protected function interpretSyntax(string $match): array argument
18 $type = str_ends_with($match, '*') ? 'u' : 'o';
19 $depth = substr_count(str_replace("\t", ' ', $match), ' ') + 1;
H A DGfmLists.php19 protected function interpretSyntax(string $match): array argument
21 $stripped = str_replace("\t", ' ', ltrim($match, "\n"));
/dokuwiki/inc/Parsing/Helpers/
H A DHtmlEntity.php58 * @param string $match A single entity reference, e.g. &#35; or &copy;
62 public static function decodeOne(string $match): string argument
64 if ($match[1] === '#') {
70 return self::decodeNumeric(substr($match, 2, -1));
74 return html_entity_decode($match, ENT_HTML5 | ENT_QUOTES, 'UTF-8');
H A DCode.php62 foreach ($matches as $match) {
63 $equal_sign = strpos($match[0], '=');
65 $key = trim($match[0]);
68 $key = substr($match[0], 0, $equal_sign);
69 $value = substr($match[0], $equal_sign + 1);
/dokuwiki/lib/scripts/
H A Deditor.js151 var match = search.match(/(\n +([\*-] ?)?)/);
152 if(match){
154 var match2 = search.match(/^\n +[\*-]\s*$/);
156 if (match2 && this.value.substr(selection.start).match(/^($|\r?\n)/)) {
163 insertAtCarret(this.id,match[1]);
171 var match = search.match(/(\n +)([*-] ?)$/);
172 if(match){
173 var spaces = match[1].length-1;
192 var match = search.match(/(\n +)([*-] )$/);
193 if(match){
/dokuwiki/_test/tests/test/
H A Dedit_and_save.test.php51 foreach ($matches as $match) {
52 $input[$match[1]] = $match[2];
73 foreach ($matches as $match) {
74 $input[$match[1]] = $match[2];
134 foreach ($matches as $match) {
135 $input[$match[1]] = $match[2];
156 foreach ($matches as $match) {
157 $input[$match[1]] = $match[2];
/dokuwiki/lib/exe/
H A Dcss.php388 if (preg_match('/(.*?)\.svg$/i', $file, $match)) {
389 $exts[] = strtolower($match[1]);
483 * @param array $match see http://php.net/preg_replace_callback
486 public function replacements($match) argument
489 …if (preg_match('#^(/|data:|https?://)#', $match[3])) { // not a relative url? - no adjustment requ…
490 return $match[0];
491 …} elseif (str_ends_with($match[3], '.less')) { // a less file import? - requires a file system loc…
492 if ($match[3][0] != '/') {
493 $match[3] = $this->getRelativePath() . '/' . $match[3];
496 $match[3] = $this->location . $match[3];
[all …]
/dokuwiki/lib/plugins/styling/
H A Dadmin.php130 if (preg_match('/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/', $value, $match)) {
131 return '#' . $match[1] . $match[1] . $match[2] . $match[2] . $match[3] . $match[3];
/dokuwiki/inc/Remote/OpenApiDoc/
H A DOpenAPIGenerator.php72 if (preg_match('/ *function (\w+)/', $line, $match)) {
73 $method = $match[1];
75 … if (preg_match('/^ *throw new RemoteException\(\'([^\']+)\'.*?, (\d+)/', $line, $match)) {
80 'code' => $match[2],
81 'message' => $match[1],
84 … if (preg_match('/^ *throw new AccessDeniedException\(\'([^\']+)\'.*?, (\d+)/', $line, $match)) {
89 'code' => $match[2],
90 'message' => $match[1],
331 if (preg_match('/^https?:\/\/(www\.)?dokuwiki\.org\/(.+)$/', $url, $match)) {
332 $name = $match[2];
/dokuwiki/inc/
H A DErrorHandler.php184 if (preg_match('/lib\/plugins\/(\w+)\//', str_replace('\\', '/', $e->getFile()), $match)) {
185 return $match[1];
191 preg_match('/\w+?_plugin_(\w+)/', $line['class'], $match)
193 return $match[1];
198 preg_match('/lib\/plugins\/(\w+)\//', str_replace('\\', '/', $line['file']), $match)
200 return $match[1];
/dokuwiki/_test/tests/Parsing/Lexer/
H A DRecordingHandler.php27 public function handleToken($modeName, $match, $state, $pos, $originalModeName = '') argument
29 $this->recorded[] = [$modeName, $match, $state, $pos];
/dokuwiki/vendor/simplepie/simplepie/library/SimplePie/Decode/HTML/
H A DEntities.php550 for ($i = 0, $match = null; $i < 9 && $this->consume() !== false; $i++) {
555 $match = $consumed;
559 if ($match !== null) {
560 …ata = substr_replace($this->data, $entities[$match], $this->position - strlen($consumed) - 1, strl…
561 $this->position += strlen($entities[$match]) - strlen($consumed) - 1;

123456