{"action":"opened","issue":{"url":"https://api.github.com/repos/sujith3g/docxtemplater-link-module/issues/10","repository_url":"https://api.github.com/repos/sujith3g/docxtemplater-link-module","labels_url":"https://api.github.com/repos/sujith3g/docxtemplater-link-module/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/sujith3g/docxtemplater-link-module/issues/10/comments","events_url":"https://api.github.com/repos/sujith3g/docxtemplater-link-module/issues/10/events","html_url":"https://github.com/sujith3g/docxtemplater-link-module/issues/10","id":188512378,"number":10,"title":"Wrong handling of template if {^link} is written inside of a sentence","user":{"login":"KharitonOff","id":8480657,"avatar_url":"https://avatars.githubusercontent.com/u/8480657?v=3","gravatar_id":"","url":"https://api.github.com/users/KharitonOff","html_url":"https://github.com/KharitonOff","followers_url":"https://api.github.com/users/KharitonOff/followers","following_url":"https://api.github.com/users/KharitonOff/following{/other_user}","gists_url":"https://api.github.com/users/KharitonOff/gists{/gist_id}","starred_url":"https://api.github.com/users/KharitonOff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KharitonOff/subscriptions","organizations_url":"https://api.github.com/users/KharitonOff/orgs","repos_url":"https://api.github.com/users/KharitonOff/repos","events_url":"https://api.github.com/users/KharitonOff/events{/privacy}","received_events_url":"https://api.github.com/users/KharitonOff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-10T13:47:21Z","updated_at":"2016-11-10T13:47:21Z","closed_at":null,"body":"The link-module replaces the whole sentence instead of replacing only the tag. This happens if you write text with tag inside at a stroke and not if you paste the tag afterwards.\r\n\r\nIt works with this xml structure (link tag is inside a separate xml tag): \r\n```\r\n            <w:r>\r\n                <w:rPr>\r\n                    <w:lang w:val=\"en-GB\" /></w:rPr>\r\n                <w:t xml:space=\"preserve\">Lorem ipsum </w:t>\r\n            </w:r>\r\n            <w:r w:rsidR=\"003F6AE5\">\r\n                <w:t>{^link</w:t>\r\n            </w:r>\r\n            <w:r w:rsidR=\"00EA5324\" w:rsidRPr=\"00EA5324\">\r\n                <w:t>}</w:t>\r\n            </w:r>\r\n            <w:r>\r\n                <w:rPr>\r\n                    <w:lang w:val=\"en-GB\" /></w:rPr>\r\n                <w:t xml:space=\"preserve\"> </w:t>\r\n            </w:r>\r\n            <w:proofErr w:type=\"spellStart\" />\r\n            <w:r>\r\n                <w:rPr>\r\n                    <w:lang w:val=\"en-GB\" /></w:rPr>\r\n                <w:t>amet</w:t>\r\n            </w:r>\r\n```\r\nthe result is: \r\n\r\n![image](https://cloud.githubusercontent.com/assets/8480657/20178966/e5979870-a753-11e6-95e4-5ba04627521d.png)\r\n\r\n\r\nbut not with this one (link tag is inside the same xml tag with other text):\r\n```\r\n             <w:r>\r\n                <w:rPr>\r\n                    <w:lang w:val=\"en-GB\" /></w:rPr>\r\n                <w:t xml:space=\"preserve\">Lorem ipsum {^link} </w:t>\r\n            </w:r>\r\n            <w:r w:rsidR=\"003B141A\">\r\n                <w:rPr>\r\n                    <w:lang w:val=\"en-GB\" /></w:rPr>\r\n                <w:t>amet.</w:t>\r\n            </w:r>\r\n```\r\n\r\nthe result here is:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/8480657/20179024/475c3660-a754-11e6-9114-8cad70b9158a.png)\r\n"}}
{"actor":{"display_login":"KharitonOff"}}