Skip to content

Commit

Permalink
fix: preserve forward slashes in frontmatter tags (#287)
Browse files Browse the repository at this point in the history
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: ben <ben@prologe.io>
  • Loading branch information
1 parent 092c67e commit fd8facf
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 fd8facf

Please sign in to comment.