Browse Source

Merge pull request #100 from hacdias/patch-1

fix: check prefix correctly
pull/108/head
Aaron Parecki 4 years ago
committed by GitHub
parent
commit
0ed2cc14a9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      lib/XRay/PostType.php
  2. +2
    -2
      tests/data/feed.example.com/rss

+ 1
- 1
lib/XRay/PostType.php View File

@ -59,7 +59,7 @@ class PostType {
// If this processed "name" property value is NOT a prefix of the
// processed "content" property, then it is an article post.
if(strpos($content, $name) === false) {
if(strpos($content, $name) !== 0) {
return 'article';
}

+ 2
- 2
tests/data/feed.example.com/rss View File

@ -90,7 +90,7 @@ Connection: keep-alive
<slash:comments>0</slash:comments>
</item>
<item>
<title>Bridgy Fed</title>
<title></title>
<link>https://snarfed.org/2017-10-22_bridgy-fed</link>
<comments>https://snarfed.org/2017-10-22_bridgy-fed#respond</comments>
<pubDate>Mon, 23 Oct 2017 04:01:46 +0000</pubDate>
@ -194,4 +194,4 @@ Connection: keep-alive
<slash:comments>84</slash:comments>
</item>
</channel>
</rss>
</rss>

Loading…
Cancel
Save