iljapostnovs / VSCodeUI5Plugin

Visual Studio Code Extension for UI5 Development
Apache License 2.0
61 stars 6 forks source link

Bug: XML formatter does change regex #358

Closed daletman closed 1 year ago

daletman commented 1 year ago

Describe the bug The XML formatter does change all double backslashes ( \\ ) in a regex to single backslash ( \ )

To Reproduce Steps to reproduce the behavior:

  1. Open a xml view
<Input value="{
    path: '/',
    type: 'sap.ui.model.type.String',
    constraints: {
        search: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]{2,}\\.[a-zA-Z0-9-.]{2,}$'
    }
}"/>
  1. Format Document with SAPUI5
  2. The \\ in the regex will be replaced with \

Expected behavior Double backslashes shouldn't be replaced by single backslash

Desktop (please complete the following information):

iljapostnovs commented 1 year ago

Hi!

Thanks for the bug report and an example. Fixed in v1.11.0, please check

daletman commented 1 year ago

Works like expected now, thanks!