Defect #13723

Collapse doesn't work with section edit link

Added by Vadim Pushtaev about 8 years ago. Updated over 7 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Text formatting
Target version:-
Resolution: Affected version:2.3.0

Description

Collapsed with collapse macro sections don't have an edit link. More than this, all following edit links don't work properly, because service-side numeration take into account all sections, even collapsed, but client-side doesn't.


Related issues

Related to Redmine - Defect #26974: Collapse macro conflicts with header section edit buttons New

History

#1 Updated by Vadim Pushtaev over 7 years ago

I can't reproduce the “more than this” part.

Considering the first part. Here is what we have in app/helpers/application_helper.rb (line 527):

macros = catch_macros(text)
#...
parse_sections(text, project, obj, attr, only_path, options)

catch_macros is a mutator, all instances of {{ macro ... }} in text are placed with {{macro(N)}}, so there is no chance parse_sections can see <h1>... inside. I don't know whether it was made on purpose or not, but I believe you can reject this issue.

#2 Updated by Asaf H over 7 years ago

It happens to me as well (the part before the "more than this").
Is there a reason you suggested rejecting this issue?

#3 Updated by Vadim Pushtaev over 7 years ago

It's not exactly a bug, it looks more like a feature.

#4 Updated by Asaf H over 7 years ago

Maybe an unavoidable behavior, but a feature?
If there are sections inside a collapser, why shouldn't the user be able to edit them?
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.

#5 Updated by Vadim Pushtaev over 7 years ago

Yeah, it would be perfect and natural, but unfortunately macros are just not made this way.

#6 Updated by Toshi MARUYAMA over 3 years ago

  • Related to Defect #26974: Collapse macro conflicts with header section edit buttons added

Also available in: Atom PDF