jarontai / html2md

A library for converting HTML to Markdown in Dart. It supports CommonMark, simple table and custom converting rules. 将html转换为markdown的Dart库,支持CommonMark、简单表格以及自定义转换规则。
https://pub.dev/packages/html2md
BSD 2-Clause "Simplified" License
57 stars 25 forks source link

Warnings printed during the usage of html2md #46

Closed vogella closed 5 months ago

vogella commented 9 months ago

Thank you for your great package.

If I use it, I see the following warnings:

../../.pub-cache/hosted/pub.dev/html2md-1.3.1/lib/src/converter.dart:108:41: Warning: Operand of null-aware operation '!' has type 'Node' which excludes null.
 - 'Node' is from 'package:html/dom.dart' ('../../.pub-cache/hosted/pub.dev/html-0.15.4/lib/dom.dart').
    sibling = util.previousSibling(node.node!);
                                        ^
../../.pub-cache/hosted/pub.dev/html2md-1.3.1/lib/src/converter.dart:111:37: Warning: Operand of null-aware operation '!' has type 'Node' which excludes null.
 - 'Node' is from 'package:html/dom.dart' ('../../.pub-cache/hosted/pub.dev/html-0.15.4/lib/dom.dart').
    sibling = util.nextSibling(node.node!);

Converter still works but maybe you want to silence these warnings.

tomyeh commented 5 months ago

It shall be the same as #41

@jarontai Any plan to release 1.3.2?

jarontai commented 5 months ago

Version 1.3.2 published, thank you!