Plain Text
In the world of web pages, the stories we tell are mostly in text. Haml simplifies this storytelling. When you write plain text in GoHT, it’s treated just as it is—text.
This is plain text
renders as:
This is plain text
Plain text can also follow a tag.
%p This is plain text
renders as:
<p>This is plain text</p>
HTML
GoHT just like Haml will not do any processing of HTML that is mixed into the Haml. It will be treated as plain text and rendered as is.
%p
This is plain text
<strong>and HTML is too</strong>
renders as:
<p>
This is plain text <strong>and HTML is too</strong>
</p>
You’ve put thought into what you’ve written into the text. GoHT will respect that and render it as is.
Escaping
Because GoHT and Haml use prefixes to indicate the type of content, you may need to escape those prefixes from time to time. This is done by using the backslash \
character.
%p
This element was created with a
\%p tag followed by some plain text
renders as:
<p>
This element was created with a %p tag followed by some plain text
</p>
The backslash \
character is used to escape the %
character, and any other character that GoHT recognizes as a prefix. You will only need to use the backslash \
character at the beginning of a line.
GoHT will not try to parse the content looking for prefixes in the middle of your content.
%p
GoHT won't treat %p as a tag in the middle of a line
renders as:
<p>
GoHT won't treat %p as a tag in the middle of a line
</p>