|
@@ -20,16 +20,7 @@ module.exports = function(theme) {
|
20
|
20
|
wrap_width = right - left,
|
21
|
21
|
max_width = 0,
|
22
|
22
|
words = smartquotes(txt + "").trim().replace(/\s\s+/g, " \n").split(/ /g),
|
23
|
|
- indent;
|
24
|
|
-
|
25
|
|
- if (type === 'caption') {
|
26
|
|
- // negative indentation for opening quotes
|
27
|
|
- indent = 20;
|
28
|
|
- }
|
29
|
|
- else if (type === 'citation') {
|
30
|
|
- // negative indentation for opening em dash
|
31
|
|
- indent = 50;
|
32
|
|
- }
|
|
23
|
+ indent = 20;
|
33
|
24
|
|
34
|
25
|
if (bottom === null && top === null) {
|
35
|
26
|
top = 0;
|
|
@@ -53,8 +44,6 @@ module.exports = function(theme) {
|
53
|
44
|
|
54
|
45
|
} else {
|
55
|
46
|
|
56
|
|
- // automatically prepend em dash to citation
|
57
|
|
- word = (type === 'citation' && i === 0) ? '— ' + word : word;
|
58
|
47
|
lines[lines.length - 1].push(word);
|
59
|
48
|
|
60
|
49
|
}
|
|
@@ -97,7 +86,7 @@ module.exports = function(theme) {
|
97
|
86
|
lines.forEach(function(line, i){
|
98
|
87
|
|
99
|
88
|
if (/caption|citation/.test(type)) {
|
100
|
|
- if (i === 0 && /^“|^—/.test(line[0])) {
|
|
89
|
+ if (i === 0 && /^“/.test(line[0])) {
|
101
|
90
|
context.fillText(line.join(" "), x, y + i * (theme[type + 'LineHeight'] + theme[type + 'LineSpacing']));
|
102
|
91
|
}
|
103
|
92
|
else {
|