Skip to content

Commit c577977

Browse files
authored
Update mrkdwn formatting examples in README
1 parent 3c4f564 commit c577977

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,25 +266,25 @@ $message = Message::fromJson($messageJson);
266266

267267
### Message Formatting
268268

269-
The `Formatter` class exists to provide helpers for formatting "mrkdwn" text. These helpers can be used so that you
269+
The `Md` class exists to provide helpers for formatting "mrkdwn" text. These helpers can be used so that you
270270
don't have to have the Slack mrkdwn syntax memorized. Also, these functions will properly escape `<`, `>`, and `&`
271271
characters automatically, if it's needed.
272272

273273
Example:
274274
```php
275275
// Note: $event is meant to represent some kind of DTO from your own application.
276-
$fmt = Kit::formatter();
276+
$md = Kit::md();
277277
$msg = Kit::message(
278278
blocks: [
279279
Kit::section(
280-
text: $fmt->sub(
280+
text: $md->sub(
281281
'Hello, {audience}! On {date}, {host} will be hosting an AMA in the {channel} channel at {time}.',
282282
[
283-
'audience' => $fmt->atHere(),
284-
'date' => $fmt->date($event->timestamp),
285-
'host' => $fmt->user($event->hostId),
286-
'channel' => $fmt->channel($event->channelId),
287-
'time' => $fmt->time($event->timestamp),
283+
'audience' => $md->atHere(),
284+
'date' => $md->date($event->timestamp),
285+
'host' => $md->user($event->hostId),
286+
'channel' => $md->channel($event->channelId),
287+
'time' => $md->time($event->timestamp),
288288
]
289289
)
290290
)

0 commit comments

Comments
 (0)