From e92d09f1dd9366c4ed2275222a5f6076f635ff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig-=C3=98rjan=20Smelror?= Date: Fri, 2 Feb 2024 17:26:22 +0100 Subject: [PATCH] _pages: Again --- qsgen2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qsgen2 b/qsgen2 index fb9a456..b962b81 100755 --- a/qsgen2 +++ b/qsgen2 @@ -442,9 +442,13 @@ function _pages() { if (${debug}) _msg debug "_pages: 1. Replacing BODY with page_content in pages_tpl using Perl" # Use Perl for multi-line and special character handling local pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") ) + else + if (${debug}) _msg debug "_pages: 2. Replacing BODY with page_content in pages_tpl using Perl" + # Use Perl for multi-line and special character handling + local pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") ) fi elif [[ ${new_updated_blogs} == "false" ]] && [[ ${blog_in_index} == "false" ]]; then - if (${debug}) _msg debug "_pages: 2. Replacing BODY with page_content in pages_tpl using Perl" + if (${debug}) _msg debug "_pages: 3. Replacing BODY with page_content in pages_tpl using Perl" # Use Perl for multi-line and special character handling local pages_tpl=$( awk -v new_body="$page_content" '{sub(/BODY/, new_body)} 1' <(echo "${pages_tpl}") ) fi