diff --git a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts index dae37142e..980d9caf3 100644 --- a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen/rules-screen.component.ts @@ -105,7 +105,7 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate { this._removeErrorMarkers(); await firstValueFrom( this._rulesService.uploadRules({ - rules: this._codeEditor.getModel().getValue(), + rules: this._getValue(), dossierTemplateId: this.#dossierTemplateId, ruleFileType: this.type, }), @@ -131,6 +131,11 @@ export class RulesScreenComponent implements OnInit, ComponentCanDeactivate { this._loadingService.stop(); } + private _getValue(): string { + this._codeEditor.getModel().setEOL(monaco.editor.EndOfLineSequence.LF); + return this._codeEditor.getModel().getValue(); + } + private async _configureSyntaxHighlighting() { const languages = (window as any).monaco.languages.getLanguages(); const javaLang = languages.find(l => l.id === 'java');