NAME
Text::Amuse::Functions
SYNOPSIS
This module provides some functions to format strings wrapping the OO interface to function calls.
use Text::Amuse::Functions qw/muse_format_line/
my $html = muse_format_line(html => "hello 'world'");
my $ltx = muse_format_line(ltx => "hello #world");
FUNCTIONS
muse_format_line ($format, $string)
Output the given chunk in the desired format (html
or ltx
).
This is meant to be used for headers, or for on the fly escaping. So lists, footnotes, tables, blocks, etc. are not supported. Basically, we process only one paragraph, without wrapping it in <p>.
muse_fast_scan_header($file, $format);
Open the file $file, which is supposed to be UTF-8 encoded. Decode the content and read its Muse header.
Returns an hash reference with the metadata.
If the second argument is set and is ltx
or <html>, filter the hashref values through muse_format_line
.
It dies if the file doesn't exist or can't be read.