Skip to content

Commit

Permalink
one paragraph is able to show
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Hernandez committed Oct 11, 2023
1 parent fb2216d commit edb2fd7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/(tabs)/search/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ function StoryScreen() {
const htmlParser = (html: string) => {
const regex = /<p>(.*?)<\/p>/;
const corresp = regex.exec(html);
const firstParagraph = (corresp) ? corresp[0] : "" // <p>text1</p>
const firstParagraphWithoutHtml = (corresp) ? corresp[1] : "" // text1
const firstParagraph = corresp ? corresp[0] : ''; // <p>text1</p>
const firstParagraphWithoutHtml = corresp ? corresp[1] : ''; // text1
return firstParagraph;
};


useEffect(() => {
getStory('170947');
Expand Down

0 comments on commit edb2fd7

Please sign in to comment.