Browse Source

Move/rename sponsored links section

Tianon Gravi 4 years ago
parent
commit
77bfb4d6a4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      push.pl

+ 3 - 3
push.pl

@@ -84,9 +84,9 @@ sub prompt_for_edit {
 	
 	
 	# extract/re-inject sponsored links
 	# extract/re-inject sponsored links
 	my $sponsoredLinks = '';
 	my $sponsoredLinks = '';
-	if ($currentText =~ m{ ( ^ --- \n+ \Q*Useful Resources*\E \n .*? \n --- \n ) }smx) {
+	if ($currentText =~ m{ ( ^ [#] \Q Sponsored Resources\E \n .*? \n --- \n ) }smx) {
 		$sponsoredLinks = $1 . "\n";
 		$sponsoredLinks = $1 . "\n";
-		$proposedText =~ s%$supportedTagsRegex%$1$2$sponsoredLinks%;
+		$proposedText =~ s%$supportedTagsRegex%$sponsoredLinks$1$2%;
 	}
 	}
 	
 	
 	my $alwaysShortTags = ($proposedFile eq 'neo4j/README.md');
 	my $alwaysShortTags = ($proposedFile eq 'neo4j/README.md');
@@ -103,7 +103,7 @@ sub prompt_for_edit {
 		my $trimmedText = $proposedText;
 		my $trimmedText = $proposedText;
 		
 		
 		# if our text is too long for the Hub length limit, let's first try removing the "Supported tags" list and add $tagsNote and see if that's enough to let us put the full image documentation
 		# if our text is too long for the Hub length limit, let's first try removing the "Supported tags" list and add $tagsNote and see if that's enough to let us put the full image documentation
-		$trimmedText =~ s%$supportedTagsRegex%$1$tagsNote$sponsoredLinks%ms;
+		$trimmedText =~ s%$supportedTagsRegex%$sponsoredLinks$1$tagsNote%ms;
 		# (we scrape until the next "h1" or a line starting with a link which is likely a build status badge for an architecture-namespace)
 		# (we scrape until the next "h1" or a line starting with a link which is likely a build status badge for an architecture-namespace)
 		
 		
 		$proposedText = $trimmedText if $alwaysShortTags;
 		$proposedText = $trimmedText if $alwaysShortTags;