@react-pdf/textkit
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -12,3 +12,3 @@ "use strict"; | ||
var _unicodeProperties = _interopRequireDefault(require("unicode-properties")); | ||
var _unicodeProperties = _interopRequireDefault(require("@react-pdf/unicode-properties")); | ||
@@ -15,0 +15,0 @@ var _empty = _interopRequireDefault(require("../../attributedString/empty")); |
{ | ||
"name": "@react-pdf/textkit", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "An advanced text layout framework", | ||
@@ -37,5 +37,5 @@ "main": "./index.js", | ||
"@babel/runtime": "^7.4.3", | ||
"@react-pdf/unicode-properties": "2.3.0", | ||
"hyphen": "^1.1.1", | ||
"ramda": "^0.26.1", | ||
"unicode-properties": "^1.3.1" | ||
"ramda": "^0.26.1" | ||
}, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
@@ -16,2 +16,8 @@ "use strict"; | ||
var DEST_REGEXP = /^#.+/; | ||
var isSrcId = function isSrcId(src) { | ||
return src.match(DEST_REGEXP); | ||
}; | ||
var renderAttachments = function renderAttachments(ctx, run) { | ||
@@ -75,3 +81,7 @@ ctx.save(); | ||
if (link) { | ||
ctx.link(0, -height - descent, runAdvanceWidth, height, link); | ||
if (isSrcId(link)) { | ||
ctx.goTo(0, -height - descent, runAdvanceWidth, height, link.slice(1)); | ||
} else { | ||
ctx.link(0, -height - descent, runAdvanceWidth, height, link); | ||
} | ||
} | ||
@@ -78,0 +88,0 @@ |
159470
4241
+ Added@react-pdf/unicode-properties@2.3.0(transitive)
+ Addedunicode-trie@0.3.1(transitive)
- Removedunicode-properties@^1.3.1
- Removedbase64-js@1.5.1(transitive)
- Removedunicode-properties@1.4.1(transitive)
- Removedunicode-trie@2.0.0(transitive)