-
Notifications
You must be signed in to change notification settings - Fork 853
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: convert _isNodeInline into a function in a extension for Node …
…objects
- Loading branch information
CatHood0
committed
Nov 28, 2024
1 parent
8429efa
commit 6bb3a13
Showing
3 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import '../../document/nodes/node.dart'; | ||
|
||
extension NodesCheckingExtension on Node { | ||
bool isNodeInline(){ | ||
for (final attr in style.attributes.values) { | ||
if (!attr.isInline) return false; | ||
} | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters