File tree 2 files changed +20
-2
lines changed
2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,25 @@ After.
72
72
expect ( result ) . toBe ( "After." ) ;
73
73
} ) ;
74
74
75
- it ( "returns all content after contributors when there is a quote template notice" , async ( ) => {
75
+ it ( "returns all content after contributors when there is a legacy quote template notice" , async ( ) => {
76
+ const getReadme = ( ) =>
77
+ Promise . resolve ( `# My Package
78
+
79
+ Usage.
80
+
81
+ <!-- spellchecker:enable -->
82
+
83
+ After.
84
+
85
+ > 💙 This package is based on ...
86
+ ` ) ;
87
+
88
+ const result = await readReadmeAdditional ( getReadme ) ;
89
+
90
+ expect ( result ) . toBe ( "After." ) ;
91
+ } ) ;
92
+
93
+ it ( "returns all content after contributors when there is a current quote template notice" , async ( ) => {
76
94
const getReadme = ( ) =>
77
95
Promise . resolve ( `# My Package
78
96
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const indicatorAfterAllContributorsSpellCheck =
3
3
/ < ! - - \s * s p e l l c h e c k e r : \s * e n a b l e \s * - - > / ;
4
4
5
5
const indicatorBeforeTemplatedBy =
6
- / > .* T h i s p a c k a g e w a s t e m p l a t e d w i t h | < ! - - Y o u c a n r e m o v e t h i s n o t i c e / ;
6
+ / > .* T h i s p a c k a g e (?: i s | w a s ) (?: b a s e d | b u i l d | t e m p l a t e d ) (?: o n | w i t h ) | < ! - - Y o u c a n r e m o v e t h i s n o t i c e / ;
7
7
8
8
export async function readReadmeAdditional ( getReadme : ( ) => Promise < string > ) {
9
9
const readme = await getReadme ( ) ;
You can’t perform that action at this time.
0 commit comments