Skip to content

Commit 480f800

Browse files
zimegClaudeclaude
authored
fix(block-kit): set verbatim false on the card block example text (#102)
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 917789e commit 480f800

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎block-kit/src/main/java/blocks/Card.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ public class Card {
1717
public static CardBlock example01() {
1818
CardBlock block = Blocks.card(c -> c.icon(BlockElements.imageElement(
1919
i -> i.imageUrl("https://picsum.photos/36/36").altText("Icon")))
20-
.title(BlockCompositions.markdownText("Lumon Industries"))
21-
.subtitle(BlockCompositions.markdownText("Committed to work-life balance"))
20+
.title(BlockCompositions.markdownText(
21+
mt -> mt.text("Lumon Industries").verbatim(false)))
22+
.subtitle(BlockCompositions.markdownText(
23+
mt -> mt.text("Committed to work-life balance").verbatim(false)))
2224
.heroImage(BlockElements.imageElement(
2325
i -> i.imageUrl("https://picsum.photos/400/300").altText("Sample hero image")))
24-
.body(BlockCompositions.markdownText("Please enjoy each card equally."))
26+
.body(BlockCompositions.markdownText(
27+
mt -> mt.text("Please enjoy each card equally.").verbatim(false)))
2528
.actions(List.of(BlockElements.button(b -> b.text(BlockCompositions.plainText(
2629
pt -> pt.text("Action Button").emoji(false)))
2730
.actionId("button_action")))));

‎block-kit/src/test/java/blocks/CardTest.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ public void testExample01() {
2222
},
2323
"title": {
2424
"type": "mrkdwn",
25-
"text": "Lumon Industries"
25+
"text": "Lumon Industries",
26+
"verbatim": false
2627
},
2728
"subtitle": {
2829
"type": "mrkdwn",
29-
"text": "Committed to work-life balance"
30+
"text": "Committed to work-life balance",
31+
"verbatim": false
3032
},
3133
"hero_image": {
3234
"type": "image",
@@ -35,7 +37,8 @@ public void testExample01() {
3537
},
3638
"body": {
3739
"type": "mrkdwn",
38-
"text": "Please enjoy each card equally."
40+
"text": "Please enjoy each card equally.",
41+
"verbatim": false
3942
},
4043
"actions": [
4144
{

0 commit comments

Comments
 (0)