Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -24,7 +24,7 @@ jobs:
extensions: mbstring

- name: Composer install
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Run code standard fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -23,7 +23,7 @@ jobs:
extensions: mbstring

- name: Composer install
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Run a static analysis with phpstan/phpstan
run: vendor/bin/phpstan analyse
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
php-version:
- 7.3
- 7.4
- 8.0
- 8.1
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog
## [Unreleased](https://github.com/akhx/typograf/compare/v0.6.0...HEAD)
* url добавлен в safeBlock

## [0.6.0](https://github.com/akhx/typograf/compare/v0.5.0...v0.6.0) - 2024-09-25
* переработан SafeBlock
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
}
},
"require": {
"php": ">=7.3",
"php": ">=7.4",
"ext-json": "*",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/php-code-coverage": "^9.2",
"friendsofphp/php-cs-fixer": "^3.4",
"phpstan/phpstan": "^1.7"
"phpstan/phpstan": "^2.0"
},
"scripts": {
"csfixer" : "./vendor/bin/php-cs-fixer fix --dry-run --diff",
Expand Down
1 change: 1 addition & 0 deletions src/SafeBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class SafeBlock
'/<!--(.+?)-->/ius',
'/\[[a-z]([^]]+)]/ius',
'/<span class=["\']no-typo["\']>(.+?)<\/span>/ius',
'/https?:\/\/?([^<\'"[\s]+)/ius',
];

/**
Expand Down
6 changes: 6 additions & 0 deletions tests/TypografTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ public function testApplyDocument(): void
</pre>
<!-- test "text" -->
<p>"Пример"</p>
https://www.domain.com/path/test-05-09-2024/
<a href="https://domain.com/path/test-05-09-2024/">https://domain.com/path/test-05-09-2024/</a>
[embed]https://domain.com/path/test-05-09-2024/[/embed]
<style>
.class {
color: red;
Expand Down Expand Up @@ -181,6 +184,9 @@ public function testApplyDocument(): void
</pre>
<!-- test "text" -->
<p>&laquo;Пример&raquo;</p>
https://www.domain.com/path/test-05-09-2024/
<a href="https://domain.com/path/test-05-09-2024/">https://domain.com/path/test-05-09-2024/</a>
[embed]https://domain.com/path/test-05-09-2024/[/embed]
<style>
.class {
color: red;
Expand Down
Loading