Skip to content

Commit

Permalink
Merge pull request #7 from calvinps/fix-replace-links
Browse files Browse the repository at this point in the history
fix replace links preg_replace
  • Loading branch information
dniccum authored Aug 9, 2019
2 parents 075fe4a + 638d2a4 commit b235c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Library/MarkdownUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private function replaceLinks(string $htmlContent, array $otherOptions): string
{
$regex = "/<a.+href=['|\"](?!http|https)([^\"\']*)['|\"].*>(.+)<\/a>/i";
$output = preg_replace($regex,'<a href="'.config('nova.path').'/documentation/\1">\2</a>',$htmlContent);
$output = preg_replace("/(\.md|.text|.mdown|.mkdn|.mkd|.mdwn|mdtxt|.Rmd|.mdtext)/i",'"',$output);
$output = preg_replace("/(\.md|\.text|\.mdown|\.mkdn|\.mkd|\.mdwn|.\mdtxt|\.Rmd|\.mdtext)/i", '"', $output);

return $output;
}
Expand Down

0 comments on commit b235c6e

Please sign in to comment.