Commits

Don Brown committed adc8794

Fix anchor rendering for Confluence wiki markup

  • Participants
  • Parent commits e178503

Comments (0)

Files changed (1)

src/main/resources/js/annotate.js

 (function() {
 
     var MAGIC_DELIMITOR = "pw3sx";
-    var wikiCommentTemplate = AJS.template("{quote}{quoteText}{quote}\n{commentText} {anchor:{anchorValue}}");
+    var wikiCommentTemplate = AJS.template("{quote}{quoteText}{quote}\n{commentText} {anchorMacro}");
     var xhtmlCommentTemplate = AJS.template('<blockquote><p>{quoteText}</p></blockquote>' +
                                             '<p>{commentText} <img class="editor-bodyless-macro" src="https://confxhtml.atlassian.com/plugins/servlet/macro/placeholder/anchor" macro-name="anchor" macro-default-parameter="{anchorValue}" /></p>');
     function submitComment(data) {
         var pageId = jQuery('#pageId').val();
         var contextPath = jQuery('#contextPath').val();
         var token = jQuery('meta[name=atlassian-token]').attr('content');
+        data.anchorMacro = "{anchor:" + data.anchorValue + "}";
         jQuery.ajax({
             type: 'post',
             url: contextPath + '/pages/doaddcomment.action?pageId=' + pageId,