Skip to content

Commit

Permalink
Move SanitizeVueTemplate to MarkdownPagesBase
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jul 28, 2023
1 parent 01241f1 commit 1e67cd2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 0 additions & 13 deletions MyApp/Markdown.Pages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,4 @@ public virtual List<MarkdownMenu> GetSidebar(string folder, MarkdownMenu? defaul

return sidebar;
}

/// <summary>
/// Need to escape '{{' and '}}' template literals when using content inside a Vue template
/// </summary>
public virtual string? SanitizeVueTemplate(string? content)
{
if (content == null)
return null;

return content
.Replace("{{", "{‎{")
.Replace("}}", "}‎}");
}
}
13 changes: 13 additions & 0 deletions MyApp/MarkdownPagesBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,19 @@ public virtual MarkdownFileBase ToMetaDoc(T x, Action<MarkdownFileBase>? fn = nu
fn?.Invoke(to);
return to;
}

/// <summary>
/// Need to escape '{{' and '}}' template literals when using content inside a Vue template
/// </summary>
public virtual string? SanitizeVueTemplate(string? content)
{
if (content == null)
return null;

return content
.Replace("{{", "{‎{")
.Replace("}}", "}‎}");
}
}

public struct HeadingInfo
Expand Down

0 comments on commit 1e67cd2

Please sign in to comment.