2.11 (aux shtml)

Operating on SXHTML document trees, nodesets, etc.

The module is called SHTML for brevity, but the procedures it provides really expect the syntax to be XML.

2.11.1 Procedures

Procedure: highlight-code code language

Convert code to SHTML with appropriate syntax highlighting for the given language.

This procedure expects the program pygmentize to be available in the environment, otherwise, it will fail.

Procedure specification:

code (string): Plain text source code as used in HTML pre elements.

language (string): The name of the programming language used in the code. It can be any of the names supported by the Pygments library.

Return value (SHTML nodeset): A nodeset representing the code only. The div and pre containers generated by the pygmentize command are left out.

Procedure: mailto address KEY: #:subject #:body

Return a mailto URI for the given address.

address (string): An email address. For example: "you@domain.net".

subject (string): An optional subject for the email message.

body (string): An optional body for the email message.

Return value (string): A valid mailto URI (with percent-encoded data if necessary).