3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-29 07:19:23 +01:00

misc/git-md-toc: fix indentation; skip README.md unless explicitly specified

This commit is contained in:
Pragmatic Software 2020-01-12 15:08:05 -08:00
parent a6c532d67e
commit 2afb5dc3f7

4
misc/git-md-toc vendored
View File

@ -153,6 +153,9 @@ foreach ( @ARGV ) {
$filename = $_; $filename = $_;
# skip README.md unless it is the only file explicitly specified
next if @ARGV > 1 and $filename eq 'README.md';
my $clean_text = $orig_text; my $clean_text = $orig_text;
# skip code fencing # skip code fencing
@ -192,6 +195,7 @@ foreach ( @ARGV ) {
[ \t\r]* [ \t\r]*
(?=\n) (?=\n)
}mgx ) { }mgx ) {
my $depth; my $depth;
my $indent; my $indent;
my $title; my $title;