About the REML markup language

REML is CodeSnip's own little markup language that can be used to style the text of a snippet's description and / or extra information.

Language Details

The REML language is a SGML language similar to a greatly simplified XHTML. The are a small number of tags you can use. Firstly there are two block-level tags that render text in paragraphs, while the other tags format text inline or embed hyplerlinks.

Block level tags

<p>...</p>
Renders the enclosed markup as a simple paragraph.
<heading>...</heading>
Renders the enclosed markup as a heading.

The following rules apply to the use of <p> and <heading>

  1. The tags must not be nested.
  2. The tags must be matched, e.g. <p> must have a matching </p>.
  3. All text should be embedded within block level tags, e.g. <heading>heading</heading> <p>text</p> or simply <p>text</p>.

Here are some valid examples:

  1. <p>Hello World</p>
  2. <heading>Hello</heading>
    <p>Hello World</p>

Srictly speaking, the following example is invalid code – the highlighted sections are in error, because they are not contained within block tags.

blah <heading>blah</heading> blah <p>blah</p> blah

However, CodeSnip is quite permissive and, in many cases, automatically adds <p>...</p> tags for text that is not enclosed in block level tags. The above code is interpreted as:

<p>blah </p>
<heading>blah</heading>
<p>blah </p>
<p>blah</p>
<p>blah</p>

Inline tags

Here are the available inline tags:

<strong>...</strong>
Renders the enclosed markup with strong emphasis.
Example: <p>Make stuff <strong>stand out</strong>.</p>
<em>...</em>
Emphasises the enclosed markup.
Example: <p>Draw <em>attention</em> to something.</p>
<var>...</var>
Used to indicate the enclosed markup is a variable.
Example: <p>Refer to a function <var>parameter</var>.</p>
<warning>...</warning>
Used for warning text.
Example: <p><warning>Warning:</warning> Don't do it!</p>
<mono>...</mono>
Renders markup in a mono-spaced font.
Example: <p>Use the: <mono>Windows</mono> unit.</p>
<a href="url">...</a>
Creates a hyperlink. The href attribute must specify the required URL, which must use one of the http:, https: or file: protocols; others are not permitted. If you use the file: protocol it must reference a valid local or network file. Be aware that if you submit or export a snippet containing a hyperlink that uses the file: protocol it will only work on the recipient's system if the specified file exists in the same location.
Example: <p><a href="http://www.delphidabbler.com">Visit DelphiDabbler.com</a></p>..

Character Entities

The "<" and "&" characters are special within the markup and must not be used directly, even when you are just entering plain text. You must use the &lt; character entity in place of "<" and &amp; instead of "&".

A few other character entities are supported for convenience. Here is the complete list:

By way of an example, if you want to display x < y, use:

x &lt; y

No other symbolic character entities are supported. However, numeric character entities can be used to insert other characters by specifying its code. For example &#64; is equivalent to "@".

Numeric entities should be used with caution. Using a code that is specific to an ANSI character set may cause unexpected results because CodeSnip uses Unicode internally and the specified character code may not represent the same character in ANSI and Unicode.