diff options
| author | patrick-scho | 2025-11-29 14:59:00 +0100 |
|---|---|---|
| committer | patrick-scho | 2025-11-29 14:59:00 +0100 |
| commit | 1f60d1a884fac7e52c4a4d9a41aaf03064b4418c (patch) | |
| tree | 5955425d2e87650b412773c062deb25eb4d12aa1 | |
| parent | bf2a7a94feb03d69b01c1b352854b432b7481215 (diff) | |
| download | ps-gitweb-1f60d1a884fac7e52c4a4d9a41aaf03064b4418c.tar.gz ps-gitweb-1f60d1a884fac7e52c4a4d9a41aaf03064b4418c.zip | |
add perl and markdown config variables
| -rwxr-xr-x | gitweb/gitweb.perl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index ed1dacd..a1c838d 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -82,6 +82,8 @@ sub evaluate_uri { # core git executable to use # this can just be "git" if your webserver has a sensible PATH our $GIT = "@GIT_BINDIR@/git"; +our $PERL = "perl"; +our $MD = "markdown"; # absolute fs-path which will be prepended to the project path #our $projectroot = "/pub/scm"; @@ -7229,7 +7231,7 @@ sub get_markdown { my $thash = shift; my $rethtmlstr = ""; use open ":encoding(utf8)"; # needed to have utf8 survive through the shell pipe - my $cmd_markdownify = $GIT . " " . git_cmd() . " cat-file blob " . $thash . " | perl -e 'my \$str = do { local \$/; <STDIN> }; \$str =~ s/<!--.*?--\s*>//gs; print \$str;' | markdown |"; + my $cmd_markdownify = $GIT . " " . git_cmd() . " cat-file blob " . $thash . " | " . $PERL . " -e 'my \$str = do { local \$/; <STDIN> }; \$str =~ s/<!--.*?--\s*>//gs; print \$str;' | " . $MD . " |"; open (FOO, $cmd_markdownify) or die_error(500, "Open git-cat-file blob '$thash' failed"); while (<FOO>) { if ($_ =~ /(<img[^>]src=")(.*?)"/) { |
