Bjarke Berg
2024-12-03 13:50:36 +01:00
committed by GitHub
parent 380f3f7e87
commit 2f388b3f91
2 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,9 @@ export class UmbTemplatingInsertMenuElement extends UmbLitElement {
switch (type) { switch (type) {
case CodeSnippetType.partialView: { case CodeSnippetType.partialView: {
this.value = getInsertPartialSnippet(value); const regex = /^%2F|%25dot%25cshtml$/g;
const prettyPath = value.replace(regex, '').replace(/%2F/g, '/');
this.value = getInsertPartialSnippet(prettyPath);
this.#dispatchInsertEvent(); this.#dispatchInsertEvent();
break; break;
} }

View File

@@ -53,10 +53,8 @@ export class UmbTemplatingItemPickerModalElement extends UmbModalBaseElement<
if (!value) return; if (!value) return;
const regex = /^%2F|%25dot%25cshtml$/g;
const prettyPath = value.replace(regex, '').replace(/%2F/g, '/');
this.value = { this.value = {
value: prettyPath, value: value,
type: CodeSnippetType.partialView, type: CodeSnippetType.partialView,
}; };
this.modalContext?.submit(); this.modalContext?.submit();