Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.135.201.190
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
1 /
vendor /
league /
commonmark /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Block
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Delimiter
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Event
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Exception
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Extension
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Inline
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Input
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Node
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Normalizer
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Reference
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
Util
[ DIR ]
drwxr-xr-x
2020-11-17 16:24
CommonMarkConverter.php
1.62
KB
-rw-r--r--
2020-11-17 16:24
ConfigurableEnvironmentInterface.php
4.08
KB
-rw-r--r--
2020-11-17 16:24
Context.php
4.01
KB
-rw-r--r--
2020-11-17 16:24
ContextInterface.php
2
KB
-rw-r--r--
2020-11-17 16:24
Converter.php
2
KB
-rw-r--r--
2020-11-17 16:24
ConverterInterface.php
533
B
-rw-r--r--
2020-11-17 16:24
Cursor.php
12.9
KB
-rw-r--r--
2020-11-17 16:24
DocParser.php
7
KB
-rw-r--r--
2020-11-17 16:24
DocParserInterface.php
523
B
-rw-r--r--
2020-11-17 16:24
ElementRendererInterface.php
1.5
KB
-rw-r--r--
2020-11-17 16:24
Environment.php
12.82
KB
-rw-r--r--
2020-11-17 16:24
EnvironmentAwareInterface.php
478
B
-rw-r--r--
2020-11-17 16:24
EnvironmentInterface.php
2.16
KB
-rw-r--r--
2020-11-17 16:24
GithubFlavoredMarkdownConverter.php
845
B
-rw-r--r--
2020-11-17 16:24
HtmlElement.php
3.45
KB
-rw-r--r--
2020-11-17 16:24
HtmlRenderer.php
3.32
KB
-rw-r--r--
2020-11-17 16:24
InlineParserContext.php
1.58
KB
-rw-r--r--
2020-11-17 16:24
InlineParserEngine.php
6.72
KB
-rw-r--r--
2020-11-17 16:24
MarkdownConverterInterface.php
627
B
-rw-r--r--
2020-11-17 16:24
UnmatchedBlockCloser.php
1.86
KB
-rw-r--r--
2020-11-17 16:24
Save
Rename
<?php /* * This file is part of the league/commonmark package. * * (c) Colin O'Dell <colinodell@gmail.com> * * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js) * - (c) John MacFarlane * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\CommonMark; use League\CommonMark\Block\Element\AbstractStringContainerBlock; use League\CommonMark\Delimiter\Delimiter; use League\CommonMark\Delimiter\Processor\DelimiterProcessorInterface; use League\CommonMark\Inline\AdjacentTextMerger; use League\CommonMark\Inline\Element\Text; use League\CommonMark\Node\Node; use League\CommonMark\Reference\ReferenceMapInterface; use League\CommonMark\Util\RegexHelper; /** * @internal */ final class InlineParserEngine { /** @var EnvironmentInterface */ protected $environment; public function __construct(EnvironmentInterface $environment) { $this->environment = $environment; } /** * @param AbstractStringContainerBlock $container * @param ReferenceMapInterface $referenceMap * * @return void */ public function parse(AbstractStringContainerBlock $container, ReferenceMapInterface $referenceMap) { $inlineParserContext = new InlineParserContext($container, $referenceMap); $cursor = $inlineParserContext->getCursor(); while (($character = $cursor->getCharacter()) !== null) { if (!$this->parseCharacter($character, $inlineParserContext)) { $this->addPlainText($character, $container, $inlineParserContext); } } $this->processInlines($inlineParserContext); AdjacentTextMerger::mergeChildNodes($container); } /** * @param string $character * @param InlineParserContext $inlineParserContext * * @return bool Whether we successfully parsed a character at that position */ private function parseCharacter(string $character, InlineParserContext $inlineParserContext): bool { foreach ($this->environment->getInlineParsersForCharacter($character) as $parser) { if ($parser->parse($inlineParserContext)) { return true; } } if ($delimiterProcessor = $this->environment->getDelimiterProcessors()->getDelimiterProcessor($character)) { return $this->parseDelimiters($delimiterProcessor, $inlineParserContext); } return false; } private function parseDelimiters(DelimiterProcessorInterface $delimiterProcessor, InlineParserContext $inlineContext): bool { $cursor = $inlineContext->getCursor(); $character = $cursor->getCharacter(); $numDelims = 0; $charBefore = $cursor->peek(-1); if ($charBefore === null) { $charBefore = "\n"; } while ($cursor->peek($numDelims) === $character) { ++$numDelims; } if ($numDelims < $delimiterProcessor->getMinLength()) { return false; } $cursor->advanceBy($numDelims); $charAfter = $cursor->getCharacter(); if ($charAfter === null) { $charAfter = "\n"; } list($canOpen, $canClose) = self::determineCanOpenOrClose($charBefore, $charAfter, $character, $delimiterProcessor); $node = new Text(\str_repeat($character, $numDelims), [ 'delim' => true, ]); $inlineContext->getContainer()->appendChild($node); // Add entry to stack to this opener if ($canOpen || $canClose) { $delimiter = new Delimiter($character, $numDelims, $node, $canOpen, $canClose); $inlineContext->getDelimiterStack()->push($delimiter); } return true; } /** * @param InlineParserContext $inlineParserContext * * @return void */ private function processInlines(InlineParserContext $inlineParserContext) { $delimiterStack = $inlineParserContext->getDelimiterStack(); $delimiterStack->processDelimiters(null, $this->environment->getDelimiterProcessors()); // Remove all delimiters $delimiterStack->removeAll(); } /** * @param string $character * @param Node $container * @param InlineParserContext $inlineParserContext * * @return void */ private function addPlainText(string $character, Node $container, InlineParserContext $inlineParserContext) { // We reach here if none of the parsers can handle the input // Attempt to match multiple non-special characters at once $text = $inlineParserContext->getCursor()->match($this->environment->getInlineParserCharacterRegex()); // This might fail if we're currently at a special character which wasn't parsed; if so, just add that character if ($text === null) { $inlineParserContext->getCursor()->advanceBy(1); $text = $character; } $lastInline = $container->lastChild(); if ($lastInline instanceof Text && !isset($lastInline->data['delim'])) { $lastInline->append($text); } else { $container->appendChild(new Text($text)); } } /** * @param string $charBefore * @param string $charAfter * @param string $character * @param DelimiterProcessorInterface $delimiterProcessor * * @return bool[] */ private static function determineCanOpenOrClose(string $charBefore, string $charAfter, string $character, DelimiterProcessorInterface $delimiterProcessor) { $afterIsWhitespace = \preg_match(RegexHelper::REGEX_UNICODE_WHITESPACE_CHAR, $charAfter); $afterIsPunctuation = \preg_match(RegexHelper::REGEX_PUNCTUATION, $charAfter); $beforeIsWhitespace = \preg_match(RegexHelper::REGEX_UNICODE_WHITESPACE_CHAR, $charBefore); $beforeIsPunctuation = \preg_match(RegexHelper::REGEX_PUNCTUATION, $charBefore); $leftFlanking = !$afterIsWhitespace && (!$afterIsPunctuation || $beforeIsWhitespace || $beforeIsPunctuation); $rightFlanking = !$beforeIsWhitespace && (!$beforeIsPunctuation || $afterIsWhitespace || $afterIsPunctuation); if ($character === '_') { $canOpen = $leftFlanking && (!$rightFlanking || $beforeIsPunctuation); $canClose = $rightFlanking && (!$leftFlanking || $afterIsPunctuation); } else { $canOpen = $leftFlanking && $character === $delimiterProcessor->getOpeningCharacter(); $canClose = $rightFlanking && $character === $delimiterProcessor->getClosingCharacter(); } return [$canOpen, $canClose]; } }