File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -585,9 +585,18 @@ function supports_svelte_versions(version_range: string): {
585
585
return result ;
586
586
}
587
587
588
+ function dont_end_by ( str : string , not_all_allowed : string [ ] ) : string {
589
+ for ( const nope of not_all_allowed ) {
590
+ if ( str . endsWith ( nope ) ) {
591
+ return str . slice ( 0 , - nope . length ) ;
592
+ }
593
+ }
594
+ return str ;
595
+ }
596
+
588
597
function calculate_description ( pkg : PackageKey & PackageNpm ) : string {
589
598
const found = FEATURED . flatMap ( ( f ) => f . packages ) . find ( ( p ) => p . name === pkg . name ) ;
590
- if ( found && found . description ) return found . description ;
599
+ if ( found && found . description ) return dont_end_by ( found . description , [ '.' ] ) ;
591
600
592
601
let desc = pkg . npm_description ?? 'NO DESCRIPTION!' ;
593
602
const replaces = [
@@ -597,7 +606,7 @@ function calculate_description(pkg: PackageKey & PackageNpm): string {
597
606
for ( const { key, value } of replaces ) {
598
607
desc = desc . replace ( key , value ) ;
599
608
}
600
- return desc ;
609
+ return dont_end_by ( desc , [ '.' ] ) ;
601
610
}
602
611
603
612
export const PACKAGES_META = {
You can’t perform that action at this time.
0 commit comments