Wicket
  1. Wicket
  2. WICKET-4760

JavaScriptStripper fails with single line comments

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8, 6.0.0
    • Fix Version/s: 6.1.0, 1.5.9
    • Component/s: wicket
    • Labels:
      None

      Description

      The valid input
      x++ //
      x++

      gets transformed to
      x++ x++

      which is syntactically invalid. This breaks the unminified version of bootstrap 2.1.1.

      The problem doesn't occur with multiline comments because the linebreaks are preserved there.

      1. WICKET-4760.patch.txt
        0.5 kB
        Christoph Leiter
      2. WICKET-4760-tests.patch.txt
        3 kB
        Christoph Leiter

        Activity

        Hide
        Christoph Leiter added a comment -

        Trivial patch which preserves newlines at the end of single line comments.

        Show
        Christoph Leiter added a comment - Trivial patch which preserves newlines at the end of single line comments.
        Hide
        Christoph Leiter added a comment -

        Adds testcase, fixes other tests.

        Show
        Christoph Leiter added a comment - Adds testcase, fixes other tests.
        Hide
        Martin Grigorov added a comment -

        Patch applied.
        Thanks!

        Show
        Martin Grigorov added a comment - Patch applied. Thanks!

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Christoph Leiter
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development