Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.6
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      Operating System: Windows 2000
      Platform: PC

      Description

      I think the semantics of the escaping operator \ (backslash) are not documented
      clearly. Especially I miss this ones:

      Why generates
      \$foo ==> $foo
      but
      \$

      {foo} ==> \${foo}

      this seems inconsistent to me. I expect
      \$

      {foo} ==> ${foo}

      I understand that
      $

      {foo:bar}

      raises an error since there are no : (colons)
      allowed in a variable-name.
      But why raises
      \$

      {foo:bar}

      also an error? I would expect that \$ disables the function of $
      as an operator, so that the following

      {..}

      will not be parsed as
      a variable name.

      There should be a simple way to generate something like
      $

      {foo:bar}

      or even
      $

      {not a variable name at all &%$}

      The workaround
      #set($D='$')
      $

      {D} {foo:bar}

      is undocumented and REALLY ugly.

        Activity

        Hide
        Will Glass-Husain added a comment -

        I agree. There's some historical reasons and backwards compatibility issues why
        it remains like this. But better docs might help. Thanks for noting this.

        Show
        Will Glass-Husain added a comment - I agree. There's some historical reasons and backwards compatibility issues why it remains like this. But better docs might help. Thanks for noting this.
        Hide
        Nathan Bubna added a comment -

        hopefully that commit helps...

        Show
        Nathan Bubna added a comment - hopefully that commit helps...

          People

          • Assignee:
            Unassigned
            Reporter:
            Frank Fischer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development