https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-11-13T09:58:53ZRedmineRedmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=530992013-11-13T09:58:53ZVadim Pushtaev
<ul></ul><p>I can't reproduce the “more than this” part.</p>
<p>Considering the first part. Here is what we have in <code>app/helpers/application_helper.rb (line 527)</code>:</p>
<pre><code class="ruby syntaxhl"><span class="n">macros</span> <span class="o">=</span> <span class="n">catch_macros</span><span class="p">(</span><span class="n">text</span><span class="p">)</span>
<span class="c1">#...</span>
<span class="n">parse_sections</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">project</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="kp">attr</span><span class="p">,</span> <span class="n">only_path</span><span class="p">,</span> <span class="n">options</span><span class="p">)</span>
</code></pre>
<p><code>catch_macros</code> is a mutator, all instances of <code>{{ macro ... }}</code> in <code>text</code> are placed with <code>{{macro(N)}}</code>, so there is no chance <code>parse_sections</code> can see <code><h1>...</code> inside. I don't know whether it was made on purpose or not, but I believe you can <strong>reject this issue</strong>.</p> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=546162014-02-02T08:00:25ZAsaf H
<ul></ul><p>It happens to me as well (the part before the "more than this").<br />Is there a reason you suggested rejecting this issue?</p> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=546222014-02-02T08:56:18ZVadim Pushtaev
<ul></ul><p>It's not exactly a bug, it looks more like a feature.</p> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=546242014-02-02T12:39:34ZAsaf H
<ul></ul><p>Maybe an unavoidable behavior, but a feature?<br />If there are sections inside a collapser, why shouldn't the user be able to edit them?<br />I think it's best if the formatter treats the collapse as a section. That way you can edit the entire collapse, or any section within it, same as you would any section.</p> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=546272014-02-03T08:38:00ZVadim Pushtaev
<ul></ul><p>Yeah, it would be perfect and natural, but unfortunately macros are just not made this way.</p> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=815152017-10-12T14:59:02ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/26974">Defect #26974</a>: Collapse macro conflicts with header section edit buttons</i> added</li></ul> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=1102152023-06-13T12:42:15ZMarcin Szewczyk
<ul><li><strong>File</strong> <a href="/attachments/30644">expand-macros-before-parsing-sections.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/30644/expand-macros-before-parsing-sections.patch">expand-macros-before-parsing-sections.patch</a> added</li></ul><p>Hi, in the 5.0.3 version the problem is still present. I attach a one-line patch that I intend to test on production (5.0.3) someday soon. For now I've tested it with version 4.2.3. <code>app/helpers/application_helper.rb</code> doesn't contain many changes between those versions so the patch should be still relevant. Testing via wiki edition (headings inside collapse, headings with inline code, TOC), running <code>rake test</code> and <code>ruby test/helpers/application_helper_test.rb</code> suggests it's OK. Although, I must admit that I may be missing something as I don't understand how the patch from <a class="changeset" title="Fixed: wrong section edit links when a heading contains inline code (#10199)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/8841">r8841</a> fixed some of the problems. My ruby skills are almost nonexistent so I'm probably missing some scope nuances.</p> Redmine - Defect #13723: Collapse doesn't work with section edit linkhttps://www.redmine.org/issues/13723?journal_id=1102832023-06-21T02:26:36ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/30679">clipboard-202306211125-xdbw9.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/30679/clipboard-202306211125-xdbw9.png">clipboard-202306211125-xdbw9.png</a> added</li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li></ul><p>I have confirmed the issue and the patch posted in <a href="#note-7">#note-7</a> fixes the issue.</p>
<p>Wiki page content:<br /><pre>
h1. Test-13723
{{collapse
h2. foo
The quick brown fox jumps over the lazy dog.
}}
h2. bar
test test
</pre></p>
<p>With the patch applied:<br /><img src="https://www.redmine.org/attachments/download/30679/clipboard-202306211125-xdbw9.png" style="width: 675px;border: 1px solid grey;" alt="" /></p>