Compare commits

...

3 Commits

2 changed files with 13 additions and 4 deletions

View File

@@ -77,6 +77,19 @@ final class MDFormatter {
}
/**
* Applies markdown formatting for fourth level headline.
*
* @param string $input Headline text.
*
* @return string
*/
public static function formatMarkdownHeadline4(string $input):string {
return '#### ' . $input . PHP_EOL;
}
/**
* Returns a horizontal rule in markdown.
*

View File

@@ -392,7 +392,6 @@ final class MD_STD {
// if ($err = curl_errno($curl)) echo $err;
// if ($errmsg = curl_error($curl)) echo $errmsg;
\curl_close($curl);
if (\is_bool($result)) {
return "";
}
@@ -478,7 +477,6 @@ final class MD_STD {
]);
curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code !== 200) {
return false;
}
@@ -743,7 +741,6 @@ final class MD_STD {
if (!($mime_type = finfo_file($finfo, $filepath))) {
throw new MDWrongFileType("Cannot get mime type of file: " . basename($filepath));
}
\finfo_close($finfo);
return $mime_type;
@@ -770,7 +767,6 @@ final class MD_STD {
\curl_setopt($ch, CURLOPT_FILE, $fp);
\curl_exec($ch);
\curl_close($ch);
$mime_type = MD_STD::mime_content_type($tmp_file);
self::unlink($tmp_file);