This file defines the PlDoc wiki parser, which parses both comments and
wiki text files. The original version of this SWI-Prolog wiki format was
largely modeled after Twiki (http://twiki.org/). The current version is
extended to take many aspects from markdown, in particular the doxygen
refinement thereof.
- See also
- - http://www.stack.nl/~dimitri/doxygen/manual/markdown.html
- wiki_lines_to_dom(+Lines:lines, +Args:list(atom), -Term) is det
- Translate a Wiki text into an HTML term suitable for html//1
from the html_write library.
- wiki_codes_to_dom(+String, +Args, -DOM) is det
- Translate a plain text into a DOM term.
- Arguments:
-
String | - Plain text. Either a string or a list of codes. |
- prolog:doc_wiki_face(-Out, +VarNames)// is semidet[multifile]
- prolog:doc_wiki_face(-Out, +VarNames, +Options0)// is semidet[multifile]
- Hook that can be used to provide additional processing for
additional inline wiki constructs. The DCG list is a list of
tokens. Defined tokens are:
- w(Atom)
- Recognised word (alphanumerical)
- Atom
- Single character atom representing punctuation marks or the
atom
' '
(space), representing white-space.
The Out variable is input for the backends defined in
doc_latex.pl
and doc_html.pl. Roughly, these are terms similar
to what html//1 from library(http/html_write) accepts.
- prolog:url_expansion_hook(+Term, -HREF, -Label) is semidet[multifile]
- This hook is called after recognising
<Alias:Rest>
, where
Term is of the form Alias(Rest). If it succeeds, it must bind
HREF to an atom or string representing the link target and Label
to an html//1 expression for the label.
- autolink_extension(?Ext, ?Type) is nondet
- True if Ext is a filename extensions that create automatic links
in the documentation.
- autolink_file(?File, -Type) is nondet
- Files to which we automatically create links, regardless of the
extension.
- section_comment_header(+Lines, -Header, -RestLines) is semidet
- Processes /** <section> comments. Header is a term
\
section(Type, Title)
, where Title is an atom holding the
section title and Type is an atom holding the text between <>.
- Arguments:
-
Lines | - List of Indent-Codes. |
Header | - DOM term of the format \section(Type, Title) ,
where Type is an atom from <type> and Title is
a string holding the type. |
- summary_from_lines(+Lines:lines, -Summary:list(codes)) is det
- Produce a summary for Lines. Similar to JavaDoc, the summary is
defined as the first sentence of the documentation. In addition,
a sentence is also ended by an empty line or the end of the
comment.
- indented_lines(+Text:list(codes), +Prefixes:list(codes), -Lines:list) is det
- Extract a list of lines without leading blanks or characters
from Prefix from Text. Each line is a term Indent-Codes, where
Indent specifies the line_position of the real text of the line.
- strip_leading_par(+Dom0, -Dom) is det
- Remove the leading paragraph for environments where a paragraph
is not required.