Skip to content

Commit 53025a7

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 0cfde18 + af294d7 commit 53025a7

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![Github PHPStan](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/phpstan.yml?branch=main&label=phpstan&style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3Aphpstan+branch%3Amain)
88
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
99
[![Maintainability](https://api.codeclimate.com/v1/badges/0fcf8cc60952fcc6d286/maintainability)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/maintainability)
10+
[![Test Coverage](https://api.codeclimate.com/v1/badges/0fcf8cc60952fcc6d286/test_coverage)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/test_coverage)
1011
![License Mit](https://img.shields.io/github/license/murdercode/laravel-shortcode-plus)
1112
[![Total Downloads](https://img.shields.io/packagist/dt/the-3labs-team/laravel-readability.svg?style=flat-square)](https://packagist.org/packages/the-3labs-team/laravel-readability)
1213

tests/ReadabilityTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@
4848
->and($images)->toContain('/static/img/bitcoin/privacy.svg');
4949
});
5050

51+
it('can parse and get the direction', function () {
52+
$html = file_get_contents(__DIR__.'/fixtures/demo.html');
53+
$direction = Readability::parse($html)->getDirection();
54+
expect($direction)->toBe('ltr');
55+
});
56+
5157
it('can parse and get the content', function () {
5258
$html = file_get_contents(__DIR__.'/fixtures/demo.html');
5359
$readability = Readability::parse($html);

tests/fixtures/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ <h4>October 31, 2008</h4>
119119

120120

121121
</div>
122-
<div id="CONTENT" class="doc-content"><h2 id="abstract"><a href="#abstract">Abstract</a></h2>
122+
<div id="CONTENT" class="doc-content" dir="ltr"><h2 id="abstract"><a href="#abstract">Abstract</a></h2>
123123

124124
<p>A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.
125125

0 commit comments

Comments
 (0)