Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent parsing when options enabled? #198

Closed
2 tasks done
faelsoto opened this issue Nov 26, 2019 · 0 comments
Closed
2 tasks done

Inconsistent parsing when options enabled? #198

faelsoto opened this issue Nov 26, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@faelsoto
Copy link

Prerequisites

  • Are you running the latest version of PHP-Textile?
  • $ composer update?

Expected behaviour

All parsing should be consistent with inline elements such as bold, regardless of restricted, lite or block elements off.

Given _hello_ *there*? as input, the output should always be <em>hello</em> <strong>there</strong>?

Actual behaviour

When using setRestricted, setLite, setBlockTags(false) and setImages, the output is <em>hello</em> *there*?

Steps to reproduce

>>> $parser = new \Netcarver\Textile\Parser();
=> Netcarver\Textile\Parser {#2999}
>>> $parser->parse('_hello_ *there*?');
=> "<p><em>hello</em> <strong>there</strong>?</p>"
>>> $parser->setBlockTags(false)->parse('_hello_ *there*?');
=> "<em>hello</em> *there*?"
>>> $parser->setRestricted(true)->parse('_hello_ *there*?');
=> "<em>hello</em> *there*?"
>>> $parser->setLite(true)->parse('_hello_ *there*?');
=> "<em>hello</em> *there*?"
>>> $parser->setImages(false)->parse('_hello_ *there*?');
=> "<em>hello</em> *there*?"

Additional information

PHP-Textile version: 3.7.3
PHP version: 7.3.11

@gocom gocom self-assigned this Nov 27, 2019
@gocom gocom added the Defect label Nov 27, 2019
@gocom gocom added this to the 3.7.4 milestone Nov 27, 2019
@gocom gocom closed this as completed in d2046f3 Nov 27, 2019
gocom added a commit that referenced this issue Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants