Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Michelf/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package php-markdown
* @author Michel Fortin <michel.fortin@michelf.com>
* @copyright 2004-2022 Michel Fortin <https://michelf.com/projects/php-markdown/>
* @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
* @copyright Original Markdown 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
*/

namespace Michelf;
Expand Down Expand Up @@ -1079,7 +1079,7 @@ protected function _doLists_callback($matches) {
}
}

if ($ol_start > 1 && $list_type == 'ol'){
if ($ol_start > 1){
$result = $this->hashBlock("<$list_type start=\"$ol_start\">\n" . $result . "</$list_type>");
} else {
$result = $this->hashBlock("<$list_type>\n" . $result . "</$list_type>");
Expand Down Expand Up @@ -1782,7 +1782,7 @@ protected function handleSpanToken($token, &$str) {
return $this->hashPart("&#". ord($token[1]). ";");
case "`":
// Search for end marker in remaining text.
if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm',
if (preg_match('/^(.*?[^`])'.preg_quote($token, '/').'(?!`)(.*)$/sm',
$str, $matches))
{
$str = $matches[2];
Expand Down
6 changes: 3 additions & 3 deletions Michelf/MarkdownExtra.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package php-markdown
* @author Michel Fortin <michel.fortin@michelf.com>
* @copyright 2004-2022 Michel Fortin <https://michelf.com/projects/php-markdown/>
* @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
* @copyright Original Markdown 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
*/

namespace Michelf;
Expand Down Expand Up @@ -218,7 +218,7 @@ protected function teardown() {
* which will be used to populate the id attribute in case it was not
* overridden.
* @param string $tag_name
* @param string $attr
* @param string|null $attr
* @param mixed $defaultIdValue
* @param array $classes
* @return string
Expand Down Expand Up @@ -1796,7 +1796,7 @@ protected function _appendFootnotes_callback($matches) {
protected function parseFootnotePlaceholders($label, $footnote_number, $reference_number) {
return str_replace(
array('^^', '%%'),
array($footnote_number, $reference_number),
array((string) $footnote_number, (string) $reference_number),
$label
);
}
Expand Down
2 changes: 1 addition & 1 deletion Michelf/MarkdownInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package php-markdown
* @author Michel Fortin <michel.fortin@michelf.com>
* @copyright 2004-2022 Michel Fortin <https://michelf.com/projects/php-markdown/>
* @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
* @copyright Original Markdown 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
*/

namespace Michelf;
Expand Down