Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10174

Console sections cannot be collapsed if no clear end of section exists

XMLWordPrintable

      When creating collapsible console sections, the console output is parsed using Regex to find the start and end of a collapsible section.
      Only the current line can be matched against however.
      This makes the end of the section difficult or impossible to define.

      Eg for the console output:
      Part 1:
      Processing file #1
      Processing file #2
      Processing file #3
      Part 2:
      Processing file #1 etc...

      It is clear where Part1, Part2 start, but not where they end (if looking at the console on a line-by-line basis).

      This could be resolved in one of two ways:
      1. by allowing multiple lines to be matched, so the end of part 1 would match the Regex '\n(?=Part 2)' [using a lookahead].

      2. as the collapsible section is closed by adding a '</div>' to the end of the matching line, an option could be provided to add the '</div>' to the beginning of the matching line instead. Therefore the end Regex would be 'Part 2'

            Unassigned Unassigned
            gtaylor giles taylor
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: