{"action":"created","issue":{"url":"https://api.github.com/repos/asciidocfx/AsciidocFX/issues/144","labels_url":"https://api.github.com/repos/asciidocfx/AsciidocFX/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/asciidocfx/AsciidocFX/issues/144/comments","events_url":"https://api.github.com/repos/asciidocfx/AsciidocFX/issues/144/events","html_url":"https://github.com/asciidocfx/AsciidocFX/issues/144","id":106311276,"number":144,"title":"UML rendered as \"link\" when scrolling with cursor","user":{"login":"ahus1","id":3957921,"avatar_url":"https://avatars.githubusercontent.com/u/3957921?v=3","gravatar_id":"","url":"https://api.github.com/users/ahus1","html_url":"https://github.com/ahus1","followers_url":"https://api.github.com/users/ahus1/followers","following_url":"https://api.github.com/users/ahus1/following{/other_user}","gists_url":"https://api.github.com/users/ahus1/gists{/gist_id}","starred_url":"https://api.github.com/users/ahus1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahus1/subscriptions","organizations_url":"https://api.github.com/users/ahus1/orgs","repos_url":"https://api.github.com/users/ahus1/repos","events_url":"https://api.github.com/users/ahus1/events{/privacy}","received_events_url":"https://api.github.com/users/ahus1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-14T10:10:22Z","updated_at":"2015-09-21T15:07:05Z","closed_at":null,"body":"When I type the rendering of UML is fine. \r\n\r\nOnce I use the cursor and scroll through the document (i.e. placing the cursor) the includes are not evaluated (?)\r\n\r\nDue to this the follwing code\r\n\r\n```\r\n[\"plantuml\", \"overview\", \"png\"]\r\n--\r\ninclude::overview.puml[]\r\n--\r\n```\r\n\r\nrenders the following image when scrolling\r\n\r\n![link](https://cloud.githubusercontent.com/assets/3957921/9847472/5c73e99e-5ad9-11e5-8a49-c7916c0caf93.png)\r\n\r\nand the correct UML when typing again\r\n\r\n![nginx](https://cloud.githubusercontent.com/assets/3957921/9847490/7d1a500c-5ad9-11e5-8669-b0683e7d13c1.png)\r\n\r\n(tested with version 1.3.8)\r\n"},"comment":{"url":"https://api.github.com/repos/asciidocfx/AsciidocFX/issues/comments/142009610","html_url":"https://github.com/asciidocfx/AsciidocFX/issues/144#issuecomment-142009610","issue_url":"https://api.github.com/repos/asciidocfx/AsciidocFX/issues/144","id":142009610,"user":{"login":"ozlerhakan","id":1964927,"avatar_url":"https://avatars.githubusercontent.com/u/1964927?v=3","gravatar_id":"","url":"https://api.github.com/users/ozlerhakan","html_url":"https://github.com/ozlerhakan","followers_url":"https://api.github.com/users/ozlerhakan/followers","following_url":"https://api.github.com/users/ozlerhakan/following{/other_user}","gists_url":"https://api.github.com/users/ozlerhakan/gists{/gist_id}","starred_url":"https://api.github.com/users/ozlerhakan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozlerhakan/subscriptions","organizations_url":"https://api.github.com/users/ozlerhakan/orgs","repos_url":"https://api.github.com/users/ozlerhakan/repos","events_url":"https://api.github.com/users/ozlerhakan/events{/privacy}","received_events_url":"https://api.github.com/users/ozlerhakan/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T15:07:05Z","updated_at":"2015-09-21T15:07:05Z","body":"I am not 100% sure but it might be related to the plantUml method of PlantUmlService. When we move the cursor over the mentioned snippet, [findRenderedSelection](https://github.com/asciidocfx/AsciidocFX/blob/90ca352869bab541d1802b4b2e57b357db634e21/conf/public/js/converters.js#L54) function is triggered and likewise asciidoctor-uml-block.js starts running \r\n\r\nThe following code returns from asciidoctor-uml-block.js when we move the cursor:\r\n```\r\n[plantuml, \"overview\", \"png\"]\r\n--\r\ninclude::overview.puml[]\r\n--\r\n```\r\nSince the plantUml method eventually is called due to asciidoctor-uml-block.js , this method again generates a new image in terms of the code with the same image path.\r\n\r\n```\r\n@startuml\r\n\r\nskinparam dpi 300\r\n[plantuml, \"overview\", \"png\"]\r\n--\r\ninclude::overview.puml[]\r\n--\r\n@enduml\r\n```\r\n\r\n![link](https://cloud.githubusercontent.com/assets/3957921/9847472/5c73e99e-5ad9-11e5-8a49-c7916c0caf93.png)\r\n\r\nI found out 2 approaches to fix it, we need to:\r\n\r\n1. stop going into the platuml method when we move the cursor (same for changing scroll), may be needed an additional variable to check or\r\n2.  search `include::`  and find the corresponding content of this file and replace it with the include directive to generate the same image again and again.\r\n\r\nwdyt kardeşim?"}}