• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

worktile / slate-angular / 2241d398-cf7c-4f79-b1b3-923ba1e05d17

11 Jul 2025 07:46AM UTC coverage: 48.44%. Remained the same
2241d398-cf7c-4f79-b1b3-923ba1e05d17

push

circleci

pubuzhixing8
build: release 19.1.0-next.3

364 of 925 branches covered (39.35%)

Branch coverage included in aggregate %.

940 of 1767 relevant lines covered (53.2%)

44.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

18.52
/packages/src/utils/block-card.ts
1
import { DOMNode, DOMSelection } from "slate-dom";
2

3
export const FAKE_LEFT_BLOCK_CARD_OFFSET = -1;
1✔
4

5
export const FAKE_RIGHT_BLOCK_CARD_OFFSET = -2;
1✔
6

7
export function hasBlockCardWithNode(node: DOMNode) {
8
    return node && (node.parentElement.hasAttribute('card-target') || (node instanceof HTMLElement && node.hasAttribute('card-target')));
×
9
}
10

11
export function hasBlockCard(selection: DOMSelection) {
12
    return hasBlockCardWithNode(selection?.anchorNode) || hasBlockCardWithNode(selection?.focusNode);
×
13
}
14

15
export function getCardTargetAttribute(node: DOMNode) {
16
    return node.parentElement.attributes['card-target'] || (node instanceof HTMLElement && node.attributes['card-target']);
3!
17
}
18

19
export function isCardLeft(node: DOMNode) {
20
    const cardTarget = getCardTargetAttribute(node);
×
21
    return cardTarget && cardTarget.nodeValue === 'card-left';
×
22
}
23

24
export function isCardLeftByTargetAttr(targetAttr: any) {
25
    return targetAttr && targetAttr.nodeValue === 'card-left';
×
26
}
27

28
export function isCardRightByTargetAttr(targetAttr: any) {
29
    return targetAttr && targetAttr.nodeValue === 'card-right';
×
30
}
31

32
export function isCardCenterByTargetAttr(targetAttr: any) {
33
    return targetAttr && targetAttr.nodeValue === 'card-center';
×
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc