jaytaylor / html2text

Golang HTML to plaintext conversion library
https://jaytaylor.com/html2text
MIT License
541 stars 138 forks source link

error: html2text #61

Open Han-YLun opened 1 year ago

Han-YLun commented 1 year ago

use this value(html will be render,so i save in code collaborative platform):

https://tech.io/snippet/wERVOek

use this code: value, err := html2text.FromString(value, html2text.Options{ PrettyTables: true, TextOnly: false, PrettyTablesOptions: &html2text.PrettyTablesOptions{ AutoFormatHeader: true, AutoWrapText: true, ReflowDuringAutoWrap: true, ColWidth: 500, ColumnSeparator: tablewriter.COLUMN, RowSeparator: tablewriter.ROW, CenterSeparator: tablewriter.CENTER, HeaderAlignment: tablewriter.ALIGN_LEFT, FooterAlignment: tablewriter.ALIGN_LEFT, Alignment: tablewriter.ALIGN_LEFT, ColumnAlignment: []int{}, NewLine: tablewriter.NEWLINE, HeaderLine: true, RowLine: false, AutoMergeCells: false, Borders: tablewriter.Border{Left: false, Right: false, Bottom: false, Top: false}, }})

err: panic: runtime error: index out of range [1] with length 1 [recovered] panic: runtime error: index out of range [1] with length 1