Open sangpark opened 3 years ago
@sangpark we test hyperlink insertion using this HTML block, https://github.com/senny/sablon/blob/master/test/fixtures/html/html_test_content.html and yours looks fine. Unfortunately I don't have easy access to MS Word to test things anymore. Can you try wrapping the link in a <div></div>
tag? If you want you can attach your word doc template to the issue and I'll try it out.
Thanks @stadelmanma . I tried wrapping my anchor link in a <div></div>
and also <p></p>
but I get similar results. I've attached the template file below.
For other information, I'm running using version 0.3.1 of the Sablon gem, on Ruby 2.6.5 and Word version 16.49 on a Mac.
I've been trying to insert a dynamic hyperlink via a mailmerge field but am running into issues.
The context json looks like
And the template docx is pretty simple with only the following
but when I run the sample command line executable
I get the following output.
I'm really not sure where the trailing \h comes from or how to make this work. I've dug through the code and added some debug and I see the Nokogiri element being parsed correctly and I see the WordML struct coming back as
I'm not sure if I'm doing something incorrectly or if this is a bug.