Text formatting library that supports BBCode, HTML and other markup via plugins. Handles emoticons, censors words, automatically embeds media and more.
MIT License
232
stars
36
forks
source link
Error on litedown plugin dealing with tabs and empty lines #73
Hi, Im migrating a large database using this parser and found an error when dealing with some lines starting with tabs and no data (copy pasted from tables or excel I guess)
Example: (warning: some editors remove tabs when pasting, lines between numbers just have a tab)
PHP Warning: str_repeat(): Second argument has to be greater than or equal to 0 in xxx/vendor/s9e/text-formatter/src/Plugins/Litedown/Parser.php on line 675
Warning: str_repeat(): Second argument has to be greater than or equal to 0 in xxx/vendor/s9e/text-formatter/src/Plugins/Litedown/Parser.php on line 675
<p>3-3-3-3</p>
<pre><code>2-2-2-2
1-1-1-1</code></pre>
I would have tried to submit a pull request with a fix but not sure what's the correct behaviour on this case, all the markdown parsers I have tried just treat those lines as empty and don't add any code block. Thanks :)
Hi, Im migrating a large database using this parser and found an error when dealing with some lines starting with tabs and no data (copy pasted from tables or excel I guess)
Example: (warning: some editors remove tabs when pasting, lines between numbers just have a tab)
outputs:
I would have tried to submit a pull request with a fix but not sure what's the correct behaviour on this case, all the markdown parsers I have tried just treat those lines as empty and don't add any code block. Thanks :)