Squash excess output

This commit is contained in:
Stig-Ørjan Smelror 2024-01-30 09:45:18 +01:00
parent 0814687f21
commit 23c6fc14dd

6
qsgen2
View File

@ -339,15 +339,15 @@ function _pages() {
# Look for links, images and videos and convert them if present. # Look for links, images and videos and convert them if present.
if (${debug}) echo "_pages: Checking for #link, #showimg and #ytvideo in page_content" if (${debug}) echo "_pages: Checking for #link, #showimg and #ytvideo in page_content"
if [[ $( grep \#link ${page_content} > /dev/null ) ]]; then if [[ $( echo ${page_content} | grep \#link ) ]]; then
echo "If #link is present, run _link: page_content" echo "If #link is present, run _link: page_content"
page_content=$( _link "${page_content}" ) page_content=$( _link "${page_content}" )
fi fi
if [[ $( grep \#showimg ${page_content} > /dev/null ) ]]; then if [[ $( echo ${page_content} | grep \#showimg ) ]]; then
echo "If #showimg is present, run _image: page_content" echo "If #showimg is present, run _image: page_content"
page_content=$( _image "${page_content}" ) page_content=$( _image "${page_content}" )
fi fi
if [[ $( grep \#ytvideo ${page_content} > /dev/null ) ]]; then if [[ $( echo ${page_content} | grep \#ytvideo ) ]]; then
echo "If #ytvideo is present, run _youtube: page_content" echo "If #ytvideo is present, run _youtube: page_content"
page_content=$( _youtube "${page_content}" ) page_content=$( _youtube "${page_content}" )
fi fi