Xbasic

suppressblanklines Function

Syntax

C SUPPRESSBLANKLINES(html as c)

Arguments

htmlCharacter

The HTML to remove blank lines from.

Returns

resultCharacter

Returns the HTML with the blank <br> and <p> lines removed.

Description

Suppresses blank <br> or <p> lines from HTML.

Example

dim html as c =<<%html%
<p>This is some html with extra blank lines</p>
<p></p>
<br>
This line is not blank<br>
<br>
<p></p>
<p>This line is not blank.</p>
%html%

? suppressblanklines(html)
= <p>This is some html with extra blank lines</p>

This line is not blank<br>

<p>This line is not blank.</p>