adjustmenst for new lines in markdown

This commit is contained in:
David Bomba 2025-03-15 07:14:41 +11:00
parent ed6a81a566
commit 7f04c0e60b
2 changed files with 11 additions and 3 deletions

View File

@ -168,6 +168,11 @@ class LicenseController extends BaseController
/* Catch claim license requests */
if (config('ninja.environment') == 'selfhost') {
if(config('ninja.license_key')){
nlog("License key found in config - using that instead");
$license_key = config('ninja.license_key');
}
nlog("Claiming v5 license");
$response = Http::get("https://invoicing.co/claim_license", [

View File

@ -213,8 +213,8 @@ class PdfBuilder
$f = $this->document->createDocumentFragment();
$template = str_ireplace(['<br>', '<br />'], "<br/>", $template);
$f->appendXML($template);
// $f->appendXML($template);
$replacements[] = $f;
@ -2093,7 +2093,10 @@ class PdfBuilder
$child['content'] = $child['content'] ?? '';
if ($this->service->company->markdown_enabled && $this->isMarkdown($child['content'])) {
$child['content'] = str_ireplace(['<br>', '<br/>', '<br />'], "\r", $child['content']);
// $child['content'] = str_ireplace(['<br>', '<br/>', '<br />'], "\r", $child['content']); //13-05-2025 - testing whether /r or <br/> can work
$child['content'] = str_ireplace(['<br>', '<br/>', '<br />'], "<br/>", $child['content']); //13-05-2025 - testing whether /r or <br/> can work
$child['content'] = $this->commonmark->convert($child['content']); //@phpstan-ignore-line
}