protected function Markdown::hashPart in Express 8
* Called whenever a tag must be hashed when a function insert an atomic * element in the text stream. Passing $text to through this function gives * a unique text-token which will be reverted back when calling unhash. * * The $boundary argument specify what character should be used to surround * the token. By convension, "B" is used for block elements that needs not * to be wrapped into paragraph tags at the end, ":" is used for elements * that are word separators and "X" is used in the general case. * *
Parameters
string $text: * @param string $boundary * @return string
18 calls to Markdown::hashPart()
- Markdown::doItalicsAndBold in vendor/
michelf/ php-markdown/ Michelf/ Markdown.php - * Convert Markdown italics (emphasis) and bold (strong) to HTML *
- Markdown::handleSpanToken in vendor/
michelf/ php-markdown/ Michelf/ Markdown.php - * Handle $token provided by parseSpan by determining its nature and * returning the corresponding value that should replace it. *
- Markdown::hashBlock in vendor/
michelf/ php-markdown/ Michelf/ Markdown.php - * Shortcut function for hashPart with block-level boundaries. *
- Markdown::makeCodeSpan in vendor/
michelf/ php-markdown/ Michelf/ Markdown.php - * Create a code span markup for $code. Called from handleSpanToken. *
- Markdown::_doAnchors_inline_callback in vendor/
michelf/ php-markdown/ Michelf/ Markdown.php - * Callback method to parse inline anchors *
File
- vendor/
michelf/ php-markdown/ Michelf/ Markdown.php, line 497
Class
- Markdown
- Markdown Parser Class
Namespace
MichelfCode
protected function hashPart($text, $boundary = 'X') {
// Swap back any tag hash found in $text so we do not have to `unhash`
// multiple times at the end.
$text = $this
->unhash($text);
// Then hash the block.
static $i = 0;
$key = "{$boundary}\32" . ++$i . $boundary;
$this->html_hashes[$key] = $text;
return $key;
// String that will replace the tag.
}