

To achieve the best performance when checking each DOM element against provided selectors, they are compiled into a decision tree. Single best match is used instead (that is the last one of those with highest specificity). unlike in CSS, values from different matched selectors are NOT merged at the convert stage.Every unique selector must have format value specified (at least once).user-defined entries are appended after predefined entries.all entries with the same selector value are merged (recursively) at the compile stage, in such way so the last defined properties a kept and the relative order of unique selectors is kept.the last selector is used when there are multiple matches of equal specificity.highest specificity selector is used when there are multiple matches.Selectors array is our loose approximation of a stylesheet.

Number of empty lines between data table rows.Const ) console. Number of spaces between data table columns. Set this to undefined in order to fall back to wordwrap limit. Set this to false to leave heading cells as they are.ĭata table cell content will be wrapped to fit this width instead of global wordwrap limit. While empty lines should be preserved in HTML, space-saving behavior is chosen as default for convenience.īy default, heading cells ( ) are uppercased. Falls back to 40 if that's also disabled. If undefined then wordwrap value is used. Set this to false to leave headings as they are. Only process internal text of anchor tags.īy default, headings (, , etc) are uppercased. If this option is set to true and link and text are the same, will be omitted and only text will be present. Keep in mind that baseUrl should not end with a /.īy default links are translated in the following way: Server host for link href attributes and image src attributes relative to the root (the ones that start with /).įor example, with baseUrl = '' and. Number of line breaks to separate this block from the next one. Note that N+1 line breaks are needed to make N empty lines. Number of line breaks to separate previous block from this one.

Predefined formattersįollowing selectors have a formatter specified as a part of the default configuration. + and > combinators (other combinators are not supported).- attribute value (with any operators and also quotes and case sensitivity modifiers).Html-to-text relies on parseley and selderee packages for selectors support.įollowing selectors can be used in any combinations: For example, div#id is much better than #id - the former will only check divs for the id while the latter has to check every element in the DOM. But it is also important how you choose selectors.
