Skip to content

Commit

Permalink
Fixes to field parsing
Browse files Browse the repository at this point in the history
Render inline tag preceding the last and glyph-type character in a field
when block tags are disabled.

Fixes #198
  • Loading branch information
gocom committed Nov 27, 2019
1 parent aa76ed1 commit d2046f3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.textile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Here's a summary of changes in each release. The list doesn't include some small

h2. Version 3.7.4 - upcoming

* Fix issue where an inline tag preceding the last character, that is a glyph, is not rendered if the block tags are disabled with @Parser::setBlockTags@ (closes "#198":https://github.com/textile/php-textile/issues/198).

h2. "Version 3.7.3 - 2019/08/30":https://github.com/textile/php-textile/releases/tag/v3.7.3

* Fix issues where divider tags placed on their own line within a paragraph, would disable Textile processing for that paragraph block (closes "#194":https://github.com/textile/php-textile/issues/194).
Expand Down
2 changes: 2 additions & 0 deletions src/Netcarver/Textile/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1980,6 +1980,8 @@ public function parse($text)
$text = $this->placeNoteLists($text);
}
} else {
$text .= "\n\n";

// Treat quoted quote as a special glyph.
$text = $this->glyphQuotedQuote($text);

Expand Down
13 changes: 13 additions & 0 deletions test/fixtures/issue-198.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Inline tag before the last question mark in the input document should be rendered when block tags are disabled:
setup:
- setBlockTags: false
input : |
_hello_ *there*?
expect : |
<em>hello</em> <strong>there</strong>?
Output should be similar with block tags enabled:
input : |
_hello_ *there*?
expect : |
<p><em>hello</em> <strong>there</strong>?</p>

0 comments on commit d2046f3

Please sign in to comment.