This is a history of changes to montalivet.
:remove-empty option to clean, which also removes the
elements left with no content after cleaning, such as the empty
paragraphs of HTML exported from Word. An inline element holding only
whitespace is unwrapped instead, so the words around it stay apart.
Table cells are kept.:collapse-whitespace option to clean, which collapses
whitespace the way a browser renders it. and <pre> are kept.:preset option to clean, with the :word preset for HTML
exported from Microsoft Word:
{:remove-tags [:span] :remove-empty true :collapse-whitespace true}.valid?, which tells whether an HTML string contains nothing that
clean would remove. It takes the safelist options of clean.unescape-html, which decodes HTML entities, with the
:in-attribute option.abs-url, which returns an attribute as an absolute URL, or nil
when it cannot be resolved.base-uri, which returns the base URI of a document or element, or
nil when it has none.parse now accepts a java.io.File, a java.nio.file.Path or a
java.io.InputStream as well as a string. Any other input throws an
ex-info.:base-uri and :charset options to parse.parse-fragment, which parses a string as a fragment of a document
body.version, which returns the version of montalivet, and
jsoup-version, which returns the version of jsoup found on the classpath.select and select-one, which find elements of a document with a
CSS selector.text, attr, attrs and outer-html to read the matched elements.clean, which removes unsafe markup from an HTML string using a jsoup
safelist. Options: :safelist (:none, :simple-text, :basic,
:basic-with-images, :relaxed), :add-tags, :remove-tags,
:add-attributes, :remove-attributes, :base-uri,
:preserve-relative-links, :pretty-print and :escape-mode.clean can differ
between jsoup versions. For example, the rel="nofollow" attribute is no
longer added to links that keep a valid href.parse, which parses an HTML string into a jsoup Document, with the
:pretty-print and :escape-mode (:base, :xhtml, :extended) options.body-html, which returns the inner HTML of a document body.escape-html, which escapes a string for use as HTML text.Can you improve this documentation? These fine people already did:
Dan & Dan LoaizaEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |