refactor: Update wiki link syntax and rendering in WikiBrowser component
- Enhanced the `renderMarkdown` function to support the new `[[slug|display name]]` format for wiki links, improving link clarity and usability. - Adjusted CSS styles for wiki links to provide a more intuitive hover effect and visual distinction. - Updated prompts in the `prompts_wiki.go` file to reflect the new wiki link syntax, ensuring consistency across the application. These changes improve the overall user experience by making wiki links more informative and visually appealing.
This commit is contained in:
@@ -30,10 +30,15 @@ func TestParseOutLinks(t *testing.T) {
|
||||
want: []string{"entity/acme-corp"},
|
||||
},
|
||||
{
|
||||
name: "pipe syntax: title|slug",
|
||||
content: "See [[Acme Corp|entity/acme-corp]] for details.",
|
||||
name: "pipe syntax: slug|display name",
|
||||
content: "See [[entity/acme-corp|Acme Corp]] for details.",
|
||||
want: []string{"entity/acme-corp"},
|
||||
},
|
||||
{
|
||||
name: "mixed: pipe and bare links",
|
||||
content: "See [[entity/acme-corp|Acme Corp]] and [[concept/rag]] here.",
|
||||
want: []string{"entity/acme-corp", "concept/rag"},
|
||||
},
|
||||
{
|
||||
name: "no links",
|
||||
content: "Just plain text without any links.",
|
||||
|
||||
Reference in New Issue
Block a user