Skip to content

fix(parser): ! in neg. operators mistranslated to dots#28

Open
koubas wants to merge 1 commit intowebantic:masterfrom
koubas:fix/negated-operators-mistranslated-to-dots
Open

fix(parser): ! in neg. operators mistranslated to dots#28
koubas wants to merge 1 commit intowebantic:masterfrom
koubas:fix/negated-operators-mistranslated-to-dots

Conversation

@koubas
Copy link
Copy Markdown

@koubas koubas commented Mar 26, 2026

Internally, dots were temporarily translated to exclamation marks and back.
When the exclamation marks were replaced back to dots, even the literal ones from the source, like the ones in negated operators, were unintentionally replaced:

      + expected - actual

       {
         "server": {
      -    "if ($var .= foo)": {
      +    "if ($var != foo)": {
             "return": "301 https://$host$request_uri"
           }
         }
       }

I fixed that by choosing a less ambiguous replacement token (<_DOT_TOKEN_>) instead of the exclamation mark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant