Defect #28734

Edit This Section broken by formatted code

Added by Volker Kleinschmidt 6 months ago. Updated 6 months ago.

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

0%

Category:Text formatting
Target version:Candidate for next minor release
Resolution: Affected version:

Description

When including code formatting (``` cs) in markdown, the Edit This Section links on the page get messed up similar to defects 14188, 11133, and 11789. The link above the formatted section will open for editing a section of the page that is too large, skipping intermediate headings that should have started a new section. And the subsequent "Edit This Section" links will open wrong (later) sections of the page for editing, with the final ones giving a 404 error because the respective section just isn't being found.

# Test page
This page demonstrates how the code formatter breaks the Edit This Section links

# Section 1
This main section is editable correctly.

## SubSection 1
This subsection is editable correctly.

## SubSection 2
This section contains formatted code. Editing it opens too much content for editing.
If one removes the second passage of formatted code in the following subsection, editing this one includes even more code, even the next higher-level section!

``` cs
public bool test
{
  get
  {
     return false;
  }
}
```

## SubSection 3
This section cannot be edited properly - instead the next section is opened for editing.

``` cs
public bool test
{
  get
  {
     return false;
  }
}
```

## SubSection 4
This subsection also cannot be edited.

# Section 2
Trying to edit this section will produce a 404 error.

History

#1 Updated by Volker Kleinschmidt 6 months ago

The code formatter used is the Rogue plugin.

Unfortunately I'm not able to discern anything in the generated page source that could cause the problem.

#2 Updated by Go MAEDA 6 months ago

  • Category set to Text formatting
  • Status changed from New to Confirmed

Confirmed the problem. It seems that the problem is caused when an unknown language name such as "cs" is used (plain Redmine does not support "cs").

#3 Updated by Go MAEDA 6 months ago

  • Target version set to Candidate for next minor release

Also available in: Atom PDF