-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proselint: trim the markdowns before running proselint
Since the quoted parts generate too many false positives
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env perl | ||
# Copyright (C) Daniel Stenberg, <[email protected]>, et al. | ||
# | ||
# SPDX-License-Identifier: curl | ||
# | ||
# Input: a markdown file, it gets modified *in place* | ||
# | ||
# The main purpose is to strip off quotes, lines starting with four spaces, | ||
# so that the result can be run through proselint better. | ||
# | ||
|
||
my $f = $ARGV[0]; | ||
|
||
open(F, "<$f") or die; | ||
|
||
while(<F>) { | ||
$_ =~ s/^ .*//g; | ||
|
||
push @out, $_; | ||
} | ||
close(F); | ||
|
||
open(O, ">$f") or die; | ||
print O @out; | ||
close(O); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters