We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 262afb2 commit 8396b0dCopy full SHA for 8396b0d
lib/jekyll/typogrify.rb
@@ -149,7 +149,7 @@ def custom_caps(text)
149
# @param [String] text input text
150
# @return [String] input text with em dashes wrapped
151
def emdash(text)
152
- text.gsub(/(\s| )—(?:mdash;|#8212;)?(\s| )/) { |str|
+ text.gsub(/(\w|\s| )—(?:mdash;|#8212;)?(\w|\s| )/) { |str|
153
$1 + '<span class="emdash">—</span>' + $2
154
}.gsub(/(\w+)="(.*?)<span class="emdash">—<\/span>(.*?)"/, '\1="\2—\3"')
155
end
0 commit comments