Skip to content

Commit

Permalink
fix(packages): Fix whitespace around html font type nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Feb 5, 2024
1 parent bf3c251 commit 7249437
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- 修复无法解析部分带有隐藏区域的楼层的问题。
- 修复上个版本引入的无法解析购买区域的问题。
- 修复更新页面无法跳转到github release的问题。
- 修复部分楼层中处于<dl>和<dd>标签内的内容无法显示的问题。
- 修复部分楼层中处于\<dl\>\<dd\>标签内的内容无法显示的问题。
- 修复部分楼层中自定义字体周围多余换行的问题。

### Changed

Expand Down
3 changes: 3 additions & 0 deletions lib/packages/html_muncher/lib/src/html_muncher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ class Muncher {
}

InlineSpan _buildFont(uh.Element element) {
final oldInDiv = state.inDiv;
state.inDiv = false;
// Setup color
final hasColor = _tryPushColor(element);
// Setup font size.
Expand All @@ -272,6 +274,7 @@ class Muncher {
state.fontSizeStack.removeLast();
}

state.inDiv = oldInDiv;
// Restore color.
return ret;
}
Expand Down

0 comments on commit 7249437

Please sign in to comment.