Skip to content
This repository was archived by the owner on May 3, 2020. It is now read-only.

Commit 6fc5c03

Browse files
committed
removes spaces from hyperlinks that break word
1 parent 28a70a5 commit 6fc5c03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helpers/helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def updateHyperlinks(xmlText)
6060
retHash["id"] = []
6161
i = 25
6262
urls.each do |url|
63-
cleanUrl = url.gsub("{{", "").gsub("}}", "")
63+
cleanUrl = url.gsub("{{", "").gsub("}}", "").gsub(" ","_")
6464
# set resourceId and xmlText
6565
resourceId = "r:id=\"rId#{i}\""
6666
xmlText = xmlText.gsub(url,"<w:hyperlink #{resourceId} w:history=\"1\"><w:r w:rsidRPr=\"00720130\"><w:rPr><w:rStyle w:val=\"Hyperlink\"/></w:rPr>#{cleanUrl}</w:r></w:hyperlink>")

0 commit comments

Comments
 (0)