File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ const validateDescription = (
112112 return false ;
113113 }
114114
115- const paragraphs = extractParagraphs ( description ) . filter ( Boolean ) ;
115+ const descriptionNoHeadings = description . replaceAll ( / ^ \s * # [ ^ \n ] * ( \n | $ ) / gm, '' ) ;
116+
117+ const paragraphs = extractParagraphs ( descriptionNoHeadings ) . filter ( Boolean ) ;
116118
117119 return paragraphs . some ( ( paragraph , parIdx ) => {
118120 const sentences = extractSentences ( paragraph , abbreviationsRegex ) ;
@@ -192,10 +194,7 @@ const validateDescription = (
192194
193195 const paragraphNoAbbreviations = paragraph . replace ( abbreviationsRegex , '' ) ;
194196
195- if (
196- ! / (?: [ . ? ! | ] | ` ` ` ) \s * $ / u. test ( paragraphNoAbbreviations ) &&
197- ! paragraphNoAbbreviations . startsWith ( '#' )
198- ) {
197+ if ( ! / (?: [ . ? ! | ] | ` ` ` ) \s * $ / u. test ( paragraphNoAbbreviations ) ) {
199198 report ( 'Sentences must end with a period.' , fix , tag ) ;
200199 return true ;
201200 }
You can’t perform that action at this time.
0 commit comments