markdown

Prolog files

md_blocks.pl  -- Block-level parser for Markdown
md_blocks/3Parses given Markdown into a structure accepted by html//1.
md_escape.pl  -- Markdown slash-escaped sequences
md_escaped_code/1List of possibly escaped symbols.
md_escaped_code/3Recognizes single code that could have been escaped.
md_escaped_string/3Recognizes string with escapes inside it.
md_header.pl  -- Markdown header parser.
md_header/3Recognizes either setext or atx-styled headings.
md_hr.pl  -- Parser for Markdown horizontal rulers
md_hr/2Recognizes an horizontal ruler.
md_lookahead_hr/2Looks ahead an horizontal ruler.
md_line.pl  -- Line-based parsing primitives.
discard_to_line_end/2Discards zero or more symbol codes untill the first line end or eos is reached.
empty_line/2Recognizes a single empty line.
empty_lines/2List of consequtive empty lines.
indent/2Recognizes normal indent which is a tab or 4 spaces.
inline_string/3Takes as few symbol codes as possible up to line end.
ln/2Recognizes line ending.
ln_or_eos/2Recognizes either a line end or eos.
lookahead/3Looks ahead a single symbol code.
lookahead_ln/2Looks ahead a line end.
lookahead_ln_or_eos/2Looks ahead a line end or end-of-stream.
merge_lines/2Merges list of lines into a flat code list.
non_empty_line/3Single non-empty line ending with newline or end-of-stream.
string_limit/4Same as string//1 but with a length limit.
md_links.pl  -- Markdown reference link parser
md_link/3Retrieves recorded link from the last invocation of md_links/2.
md_links/2Same as md_links/3 but stores links in threadlocal predicate which is cleared on each invocation of this predicate.
md_links/3Markdown reference link definition parser.
md_list_item.pl  -- List item parser
md_bullet_list_item/4Recognizes a single bulleted list item.
md_ordered_list_item/4Recognizes a single ordered list item.
md_parse.pl
md_html_codes/2Converts Markdown into HTML string.
md_html_file/2Same as md_html_codes/2 but reads input from file.
md_html_stream/2Same as md_html_codes/2 but reads input from stream.
md_html_string/2Same as md_html_codes/2 but takes input as string.
md_parse_codes/2Parses Markdown into a structure suitable in use with html//1.
md_parse_file/2Same as md_parse_codes/2 but reads input from file.
md_parse_stream/2Same as md_parse_codes/2 but reads input from stream.
md_parse_string/2Same as md_parse_codes/2 but takes a string instead.
md_span.pl  -- Span-level Markdown parser
md_span_codes/2Turns the list of codes into a structure acceptable by SWI-Prolog's html//1 predicate.
md_span_string/2Same as md_span_codes/2 but uses a string ans input.
md_span_decorate.pl  -- Parser for span-level styles
md_span_decorate/4Recognizes style formatting in the middle of span text.
md_span_link.pl  -- Markdown span-level link parsing
md_span_link/3Recognizes different types of links from the stream of symbol codes.
md_trim.pl  -- Code list whitespace trimming
trim/2Trims whitespace from both sides of the list of codes.
trim_left/2Trims whitespaces from the beginning of the list of codes.
trim_right/2Trims whitespace from the end of the list of codes.