Skip to content

Latest commit

 

History

History
131 lines (75 loc) · 2.9 KB

HTMLTableParser.md

File metadata and controls

131 lines (75 loc) · 2.9 KB

@felisdiligens/md-table-tools / Exports / HTMLTableParser

Class: HTMLTableParser

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new HTMLTableParser(mode?, turndownService?)

Parameters

Name Type Default value
mode HTMLTableParserMode HTMLTableParserMode.ConvertHTMLElements
turndownService TurndownService undefined

Defined in

tables/htmlTable.ts:130

Properties

mode

mode: HTMLTableParserMode = HTMLTableParserMode.ConvertHTMLElements

Defined in

tables/htmlTable.ts:131


turndownService

turndownService: TurndownService

Defined in

tables/htmlTable.ts:132

Methods

parse

parse(table): Table

Parameters

Name Type
table string

Returns

Table

Implementation of

TableParser.parse

Defined in

tables/htmlTable.ts:134


parseCell

Private parseCell($cell): string

Parameters

Name Type
$cell Cheerio

Returns

string

Defined in

tables/htmlTable.ts:335


parseSection

Private parseSection($, table, $rows, defaultTextAlign, isHeader?, allowHeaderDetection?, firstRowStartsNewSection?): void

Parameters

Name Type Default value
$ Root undefined
table Table undefined
$rows Cheerio undefined
defaultTextAlign TextAlignment undefined
isHeader boolean false
allowHeaderDetection boolean false
firstRowStartsNewSection boolean false

Returns

void

Defined in

tables/htmlTable.ts:237