Commit graph

62 commits

Author SHA1 Message Date
c7c8b4929b added tom cells
Some checks are pending
CI / Linting - PHP 7.4 (push) Waiting to run
CI / Linting - PHP 8.0 (push) Waiting to run
CI / Linting - PHP 8.1 (push) Waiting to run
CI / Linting - PHP 8.2 (push) Waiting to run
2025-11-23 16:45:07 -06:00
Richard Flynn
98b12b84b1
Check $parts variable for false value (#400)
This currently throws a `TypeError` if `$parts` is `false`, which is a valid return value for `preg_split`.
2025-06-17 19:36:24 -04:00
Kevin Boyd
dbb995733d
Cast attr to string to prevent a PHP deprecation warning in 8.1 (#365)
* Cast attr to string to prevent a PHP deprecation warning in 8.1

* Update the call to preg_match_all to coalesce an empty string on $attr
2025-06-17 19:32:56 -04:00
Míng
b9604e39bd Try to fix unit test error. 2023-04-28 09:00:35 +08:00
Míng
fbc3604077 Add id and class attr for table. 2023-04-27 18:52:40 +08:00
Michel Fortin
932cbc7760 Updated copyright year. 2022-09-25 23:33:41 -04:00
Michel Fortin
5bbf780e31 Merge remote-tracking branch 'github/lib' into lib-1.x 2022-09-22 23:23:01 -04:00
Alexey Kopytko
73842d65be
preg_split returning false will cause TypeError on invalid countable in PHP 8 2022-09-14 22:28:30 +09:00
Alexey Kopytko
546b80a136
Fix PHPStan issues and build on PHP 8.2 (#368)
Limit PHPStan to PHP 8.1
2022-09-04 21:33:36 -04:00
Michel Fortin
5024d623c1 Updating Readme and copyright for 1.9.1. 2021-11-23 21:52:38 -05:00
Tac Tacelosky
e60f9373a3 fix some errors reported by phpstan 2021-11-08 07:52:44 -05:00
Tac Tacelosky
814ea61f11 declare types in php rather than annotations 2021-11-07 07:57:49 -05:00
Tac Tacelosky
7398fd13af type arrays for class and subclass 2021-11-07 07:46:59 -05:00
Thomas Hochstein
5078cf7782 Treat <details> and <summary> as block level.
<details> and <summary> elements should never
be wrapped in "<p></p>".

Signed-off-by: Thomas Hochstein <thh@inter.net>
2020-04-22 17:24:00 +02:00
Verest
58b07d26c3 fixed unintended blank title attributes 2020-04-08 20:24:25 -07:00
Michel Fortin
5e2c895aaa Updating copyright dates. 2019-12-01 21:29:53 -05:00
Frans-Willem Post
0c967f7c22 Resolved two more curly-brace deprecation warnings 2019-11-05 10:51:56 +01:00
Remi Collet
a35858f040 curly braces is deprecated 2019-07-26 14:51:37 +02:00
Sunny Walker
de4d677a4c implement placeholder parsing for footnote backlink title, aria-label, html
also, no (empty) backlink is generated when the $fn_backlink_html is
blank
2018-10-15 10:35:30 -10:00
Sunny Walker
24a2fcc546 improve source formatting consistency 2018-10-15 10:27:00 -10:00
Sunny Walker
148a5f41e3 rollback change to footnote names
invalidating spaces in footnote names, while technically correct from
HTML standards point of view is an unnecessarily burdensome breaking
change at this time
2018-10-12 14:27:54 -10:00
Sunny Walker
c62b72fc97 reduce repeated code and refer to the internal footnote number
refer to the internal footnote number instead of the named reference id
2018-10-12 09:14:39 -10:00
Sunny Walker
a954f6d698 do not accept named footnotes with whitespace
whitespace creates invalid HTML ids
2018-10-12 09:04:19 -10:00
Sunny Walker
6027807de6 add $fn_backlink_label as aria-label option
WCAG 2.0 2.4.4 says link texts to different urls cannot be the same.
aria-label matching the title attribute is probably redundant and
doesn't solve the issue, so this implementation allows for
user-overridable aria-labels with reference and footnote number
reference options to comply with 2.4.4
2018-10-11 15:42:39 -10:00
Nicolas CARPi
34084e0012 Make default value of $footnotes_assembled null again 2018-08-13 22:51:49 +02:00
Nicolas CARPi
abcafda9b6 Various little fixes
* Check if property is callable with is_callable everywhere needed
* Remove the & from the docblock declaration of variable passed by
reference
* Make default value of $footnotes_assembled an empty string instead of
null because it is concatenated afterwards with a string
* Use $mode instead of $this->mode (undeclared property anyway, and not
used anywhere else afaik)
* Correct the docblock types for some variables
2018-08-08 18:16:24 +02:00
Michael Butler
29b66556c7 Cleanup code, del unused variables 2018-04-05 22:28:10 -04:00
Michel Fortin
dfaa413aab Adding note about role="doc-endnotes" when using footnote_assembled. 2018-03-16 23:49:14 -04:00
James K
8bbbbf0fbd Refactoring append_footnotes to omit_footnotes and other requested adjustments.
See discussion on #294.
2018-03-02 01:23:25 -05:00
James K
1118518cb0 Adding "append_footnotes" option. Potential solution to #286. 2018-03-01 17:51:35 -05:00
Michel Fortin
01ab082b35 Preparing 1.8.0 release. 2018-01-14 19:49:33 -05:00
Tobias Bengfort
2630bd5a40 add backling aria-label 2017-12-29 19:54:51 +01:00
Tobias Bengfort
293d17ab70 fix typo 2017-12-29 10:15:39 +01:00
Tobias Bengfort
aee8756b31 add dpub-aria roles for footnotes
see https://www.w3.org/TR/dpub-aria/
2017-12-29 09:43:39 +01:00
Timothée Jaussoin
d4c3a97b24 Rename the variable $hashtag_protection 2017-06-16 23:05:39 +02:00
Timothée Jaussoin
6508d98322 Add an option to enforce the space when converting atx-style headers 2017-06-13 23:17:33 +02:00
Jon Dufresne
a1595371cf Clean up trailing white space across all files 2017-04-22 14:04:08 -07:00
Christian Kraus
33e762c73d Fix typo in phpdoc comment 2016-11-24 00:26:17 +03:30
Michel Fortin
05747a4749 Fixing two-space-at-end-of-line hard breaks inside of HTML blocks expecting span-level content.
- The code should insert the empty-string hash after the new line (at the beginning of the next line) true to its comment above. Instead it was added after, probably with various side effects such as breaking hard breaks.

Fix #252
2016-10-29 14:26:18 -04:00
Michel Fortin
8623708448 Fixing handling of list items with span-level content so that nested lists aren't passed through the span gamut.
This more principled approach should have no effect on the output other than prevent line breaks from appearing between the text of a list item and its nested list. It has become somewhat necessary after adding `hard_wrap`.
2016-08-29 16:25:25 -04:00
Viktor Szakats
0bec870817 Restore https after f5cd0dbcf4 2016-07-13 22:57:33 +02:00
Michel Fortin
6b4f89fd19 Merge branch 'issue/98-phpdoc-comments' of git://github.com/robbieaverill/php-markdown into lib
Reverted some changes to Readme.php and the .inc files and corrected a syntax error in MarkdownExtra.php.
2016-03-13 20:44:48 -04:00
Robbie Averill
aee1b20499 Fixed author references 2016-03-04 08:28:21 +13:00
Robbie Averill
f5cd0dbcf4 [#98] Changing to PHPDoc comments 2016-03-03 13:39:53 +13:00
Michel Fortin
4482d30bb0 Fix for unnecessary backtracking in the special attribute block regex.
Fixes #213.
2015-12-03 21:02:24 -05:00
Michel Fortin
e1e3fc2a01 Renaming fn_backlink_text to fn_backlink_html to clarify that this is HTML content. 2015-10-16 21:13:21 -04:00
dana
e244a9e33a Made fn_backlink_text user-configurable, added U+FE0E to prevent iOS emoji display 2015-10-16 16:37:20 -05:00
Michel Fortin
37a75bfac8 Merge branch 'code_block_content_func' into lib 2015-08-04 17:30:50 -04:00
Michel Fortin
c9220d1bb3 Finalization of fenced code block improvements by Mario Konrad:
- Moving `code_block_content_func` configuration variable to regular Markdown parser, now using it to convert the content of indented code blocks to HTML too.
- Fix for code block class name and special attribute blocks together.
- Updated the fenced code block syntax in the HTML block parser (so it correctly skips those code blocks).
- Updated Readme.md to explain the changes.
2015-08-04 17:29:59 -04:00
Viktor Szakats
2eaa375f52 use https in URLs where possible 2015-07-01 21:40:16 +02:00