Merge branch 'RED-7684' into 'master'
RED-7684: Convert line endings in rule editors to LF Closes RED-7684 See merge request redactmanager/red-ui!130
This commit is contained in:
commit
de355ad080
@ -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');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user