Open Han-YLun opened 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}, }})
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
panic: runtime error: index out of range [1] with length 1 [recovered] panic: runtime error: index out of range [1] with length 1
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