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

Fix for crash in Dart 2 #3

Closed tadejkan closed 6 years ago

tadejkan commented 6 years ago

Converter currently crashes in Dart 2, because it fails to detect "result" variable as Map<String, String>, but it instead detects it as Map<dynamic, dynamic>. This Exception is thrown: type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Map<String, String>' where _InternalLinkedHashMap is from dart:collection Map is from dart:core String is from dart:core String is from dart:core