File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ const FEATURED: {
208
208
packages : [
209
209
{ name : '@sveltejs/kit' } ,
210
210
{ name : 'svelte-routing' } ,
211
- { name : '@roxi/routify' } ,
211
+ { name : '@roxi/routify' , description : 'Automate Svelte routes based on file structure.' } ,
212
212
{ name : 'svelte5-router' } ,
213
213
{ name : 'svelte-pathfinder' } ,
214
214
{ name : 'universal-router' }
@@ -527,7 +527,16 @@ function supports_svelte_versions(version_range: string): {
527
527
function calculate_description ( pkg : PackageKey & PackageNpm ) : string {
528
528
const found = FEATURED . flatMap ( ( f ) => f . packages ) . find ( ( p ) => p . name === pkg . name ) ;
529
529
if ( found && found . description ) return found . description ;
530
- return pkg . npm_description ?? 'NO DESCRIPTION!' ;
530
+
531
+ let desc = pkg . npm_description ?? 'NO DESCRIPTION!' ;
532
+ const replaces = [
533
+ // strip out markdown links
534
+ { key : / \[ ( .* ?) \] \( ( .* ?) \) / g, value : '$1' }
535
+ ] ;
536
+ for ( const { key, value } of replaces ) {
537
+ desc = desc . replace ( key , value ) ;
538
+ }
539
+ return desc ;
531
540
}
532
541
533
542
export const PACKAGES_META = {
Original file line number Diff line number Diff line change 8
8
};
9
9
10
10
let { pkg }: Props = $props ();
11
-
12
- // transform [text](https://url) to <a href="url" target="_blank" rel="noreferrer">text</a>
13
- const htmlDescription = $derived (
14
- pkg .description ?.replace (
15
- / \[ (. *? )\]\( (. *? )\) / g ,
16
- ' <a href="$2" target="_blank" rel="noreferrer">$1</a>'
17
- )
18
- );
19
11
</script >
20
12
21
13
<article data-pubdate ={pkg .updated }>
49
41
</span >
50
42
</header >
51
43
52
- <p class ="description" >{@html htmlDescription }</p >
44
+ <p class ="description" >{pkg . description }</p >
53
45
54
46
<p class =" stats" >
55
47
{#if pkg .downloads }
You can’t perform that action at this time.
0 commit comments