| Did you know ... | Search Documentation: |
| html_text.pl -- Render HTML as plain text |
This module renders HTML markup as plain text, just like the open lynx program does. It is (as yet), limited to and spacialized for dealing with the SWI-Prolog documentation. This library first of all supports help/1.
html_text(+Input) is det
html_text(+Input, +Options) is detcurrent_output. Input is either an HTML
DOM or a valid input for load_html/3. Options defined are:
justify or left. Default is justify.
format_dom(+DOM, +State) is det[private]current_output according to State.
block_element(+El, +Attrs, -Margin, -ParOPtions, -Style)[private]
block_words(+Content, -RestContent, -Words, +State)[private]
words(+Tokens, +State)//[private]w(Word,Len,Attrs) and b(Len,_) terms for words
and (breakable) white space.
join_whitespace(Elements, Joined)[private]
update_style(+Style:list, +State0, -State)[private]
add1_style(+New, +Style0, -Style) is det[private]
state_par_properties(+State, -ParProps)[private]
emit_block(+Words, +Options, +State) is det[private]
init_nl is det[private]
init_nl(-State) is det[private]
exit_nl(+State) is det[private]
emit_code(+Content, +BlockAttrs, +State)[private]
format_table(+Content, +Attrs, +BlockAttrs, +State) is det[private]
column_widths(+AutoWidths, +MaxTableWidth, -Widths) is det[private]
columns(+Rows, -Columns) is det[private]td
element as needed.
format_row(+ColWidths, +State, +MarginLeft, +Row)[private]
format_cells(+ColWidths, -CWSpanned, +Col0, +Row, +State, -Cells)[private]
cell_align(+Cell, -Align) is det[private]align=Align possibility and very naively parsed CSS
text-align:center, etc.
format_cell_to_string(+Cell, +ColWidth, +State, -String) is det[private]
emit_hr(+Attrs, +BlockOptions, +State)[private]The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
html_text(+Input) is det
html_text(+Input, +Options) is detcurrent_output. Input is either an HTML
DOM or a valid input for load_html/3. Options defined are:
justify or left. Default is justify.