Skip to content

Commit

Permalink
fix: preserve forward slashes in frontmatter tags
Browse files Browse the repository at this point in the history
Co-Authored-By: ben <ben@prologe.io>
  • Loading branch information
devin-ai-integration[bot] and benjaminshafii committed Dec 20, 2024
1 parent 092c67e commit ac3c47a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin/someUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function sanitizeTag(tag: string): string {
// Remove any leading '#' symbols
let sanitized = tag.replace(/^#+/, "");

// Replace spaces and special characters with underscores, allowing Unicode word characters
sanitized = sanitized.replace(/[^\p{L}\p{N}\-]+/gu, "_");
// Replace spaces and special characters with underscores, allowing Unicode word characters and forward slashes
sanitized = sanitized.replace(/[^\p{L}\p{N}\-\/]+/gu, "_");

// Remove any leading or trailing underscores
sanitized = sanitized.replace(/^_+|_+$/g, "");
Expand Down

0 comments on commit ac3c47a

Please sign in to comment.