diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2016-09-18 05:07:39 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2016-09-18 05:08:59 -0600 |
| commit | 3a3a7039b95302e8029542488bd8027c153f885c (patch) | |
| tree | e6d686cbd5a093a31a05a0e5c2238c1cd5860adb | |
| parent | 1dc07d931e31de452d6dd9d7c387b5e202b65631 (diff) | |
revert fix for #447 as it breaks anchors
- leave zero-width space character so Prawn doesn't drop fragment
| -rw-r--r-- | CHANGELOG.adoc | 1 | ||||
| -rw-r--r-- | lib/asciidoctor-pdf/formatted_text/transform.rb | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index fcbfa102..ff926a7c 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -14,7 +14,6 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[ * Prevent the SVG from modifying the document font (#494) * Implement decorative border for multipage quote and verse blocks (#270, #557, #558) * Encode anchors in hex that contain characters outside of ASCII range (#481, #301) -* Clear the placeholder text used for an anchor to fix CannotFit error in table cell (#447) * Size the line number gutter correctly (accounting for width of largest line number) (#402) * Allow theme to specify default value for pdfwidth attribute on image (#455) * Fix front matter page numbering by adding page labels for all front matter pages in outline (#458) diff --git a/lib/asciidoctor-pdf/formatted_text/transform.rb b/lib/asciidoctor-pdf/formatted_text/transform.rb index 3b8b8da1..08438e59 100644 --- a/lib/asciidoctor-pdf/formatted_text/transform.rb +++ b/lib/asciidoctor-pdf/formatted_text/transform.rb @@ -11,7 +11,7 @@ class Transform apos: '\'' } CharRefRx = /&(?:#(\d{2,6})|(#{CharEntityTable.keys * '|'}));/ - ZeroWidthSpace = %(\u200b) + #ZeroWidthSpace = %(\u200b) def initialize(options = {}) @merge_adjacent_text_nodes = options[:merge_adjacent_text_nodes] @@ -194,8 +194,8 @@ class Transform } : value end if !fragment[:name] && (value = attrs[:name]) - # NOTE ZeroWidthSpace is used as placeholder text for an empty <a> element - fragment[:text] = '' if fragment[:text] == ZeroWidthSpace + # NOTE ZeroWidthSpace is used as placeholder text so Prawn doesn't drop fragment + #fragment[:text] = ZeroWidthSpace fragment[:name] = value fragment[:callback] = InlineDestinationMarker end |
