Skip to content

Commit 83579ee

Browse files
committed
Make text_limit B/C - resolve #17
1 parent f04d123 commit 83579ee

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Create with options.
7575
```php
7676
$options = [
7777
'strip_scheme' => false,
78-
'text_limit' => false,
78+
'text_limit' => null,
7979
'auto_title' => false,
8080
'escape' => true,
8181
'link_no_scheme' => false

src/Autolink.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,14 @@ public function textLimit(int|callable|null $value = null): static
263263

264264
public function getTextLimit(): int|callable|null
265265
{
266-
return $this->getOption('text_limit');
266+
$value = $this->getOption('text_limit');
267+
268+
// Fix for B/C
269+
if ($value === false) {
270+
$value = null;
271+
}
272+
273+
return $value;
267274
}
268275

269276
/**

0 commit comments

Comments
 (0)