Skip to content

Commit

Permalink
removed function and placed html-parser function in global
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Hernandez committed Oct 11, 2023
1 parent 77f2de8 commit 79a5c2b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/app/(tabs)/search/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ function StoryScreen() {
}
};

const htmlParser = (html: string) => {
const regex = /<h2(.*?)h2>(\n+<p(.*?)p>)+/; // regex grabs heading and paragraph tags for story
const corresp = regex.exec(html);
const story = corresp ? corresp[0] : ''; // <h2>heading<h2> <p>paragraph1</p> ...
return story;
};

useEffect(() => {
getStory('170947');
}, []);
Expand Down

0 comments on commit 79a5c2b

Please sign in to comment.