diff --git a/packages/readabilityjs/Readability.js b/packages/readabilityjs/Readability.js index 521983738..c882451d1 100644 --- a/packages/readabilityjs/Readability.js +++ b/packages/readabilityjs/Readability.js @@ -918,8 +918,8 @@ Readability.prototype = { } }); - // replace tables of article content with divs for newsletters - this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]), "div"); + // replace tables whose role is not presentation with divs for newsletters + this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]).filter(t => t.getAttribute("role") !== "presentation"), "div"); // Final clean up of nodes that might pass readability conditions but still contain redundant text // For example, this article (https://www.sciencedirect.com/science/article/abs/pii/S0047248498902196) diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html index a9e1d8670..2db2e09f0 100644 --- a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html @@ -2,10 +2,10 @@
|
+
@@ -63,591 +63,591 @@
-
- |
+
+
- |
+
- |
+ Nasdaq +
- |
+ 12,266.41 +
+ |
+
+ |
+
+ |
+ *Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. + +
+ |
+
- |
-
+1.27% - |
- ||||||||||||||||||||||||
|
-
-
+
+
+
+
+
- |
-
- |
- S&P -
- |
- 4,110.41 -
+ |
|
+
-
+
+ +1.06% +AUTO++ Nikola founder’s fraud trial gets rolling +
+ Stefan Puchner/Getty Images
+
+
+
+
+
+
+
+ The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors. +The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product. +So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder? +A hype-y road+Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral). +Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege. +And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.” +Where things stand now+In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter. +Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK +
+
+
+
+
+
+
+ |
+
+
+ TOGETHER WITH FACET WEALTH++ + Money on everyone’s mind + ++
+
+ In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on. +And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help. +Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going. +Brew readers get 2 free* months in their first year of financial planning. Sign up here. + + + +
+
+
+
+
+
+
+ |
+
+
+ WORLD++ + Tour de headlines + ++
+ Mandel Ngan/Getty Images
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ EDUCATION++ The list that no one likes is out ++
+ Jon Lovette/Getty Images
+
+
+
+
+
+
+
+ US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated. +Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.” +Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.” +There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging. +Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM +
+
+
+
+
+
+
+ |
+
+
+
+ FOOD & BEVERAGE+Starbucks puts the ‘mint’ in peppermint+
+ Zhang Peng/Getty Images
+
+
+
+
+
+
+
+ The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs. +The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary. +These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips. +Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune. +Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR +
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ GRAB BAG++ + Key performance indicators + ++
+ Francis Scialabba
+
+
+ Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed. +Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.” +The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016. +Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker) +
+
+
+
+
+
+
+ |
+
+
+ WHAT ELSE IS BREWING+
+
+
+
+
+
+
+
+
+ |
+
+
+ BREW'S BETS+
+
+ Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more. +Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing. +Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now. +Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.* +*This is sponsored advertising content. +
+
+
+
+
+
+
+ |
+
+
+ GAMES++ + The puzzle section + ++
+
+ Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here. +Tagline trivia+There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film. +
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here. +Check out more from the Brew: +
+
+
+
+
+
+
+ |
+
+
+ + + Answer + ++
+
+ 1. Cinderella +2. Office Space +3. The Social Network +4. The 40-Year-Old Virgin +5. My Cousin Vinny +
+
+
+
+
+
+ |
+
+
+ ✢ A Note From Facet Wealth +Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice. +*Two months free offer is only valid for an annual fee paid at the time of signing. +
+
-
+ |
+ Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt + +Was this email forwarded to you? Sign up here. +
+ ADVERTISE // CAREERS // SHOP // FAQ
+ |
Update your email preferences or unsubscribe here. Copyright © 2022 Morning Brew. All rights reserved. |
- |||||||||||||||
|
-
-
-
- |
-
- |
- Dow -
- |
- 32,381.34 -
- |
-
-
- +0.71% - |
-|||||||||||||||||||||||||||||
|
-
-
-
- |
-
- |
- 10-Year -
- |
- 3.358% -
- |
-
-
- +4.3 bps - |
-|||||||||||||||||||||||||||||
|
-
-
-
- |
-
- |
- Bitcoin -
- |
- $22,311.05 -
- |
-
-
- +3.05% - |
-|||||||||||||||||||||||||||||
|
-
-
-
- |
-
- |
- Apple -
- |
- $163.43 -
- |
-
-
- +3.85% - |
-|||||||||||||||||||||||||||||
|
- *Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. - - |
-|||||||||||||||||||||||||||||||||
-
|
-|||||||||||||||||||||||||||||||||
| - | -|||||||||||||||||||||||||||||||||
|
-
-
-
- AUTO-- Nikola founder’s fraud trial gets rolling --
- Stefan Puchner/Getty Images
-
-
-
-
-
-
-
- The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors. -The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product. -So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder? -A hype-y road-Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral). -Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege. -And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.” -Where things stand now-In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter. -Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK - |
- |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
-
-
- TOGETHER WITH FACET WEALTH-- - Money on everyone’s mind - --
-
- In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on. -And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help. -Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going. -Brew readers get 2 free* months in their first year of financial planning. Sign up here. - - - - |
- |||||||||||||||||||||||||||||||||
|
-
-
- WORLD-- - Tour de headlines - --
- Mandel Ngan/Getty Images
-
-
-
|
- |||||||||||||||||||||||||||||||||
|
-
-
-
- EDUCATION-- The list that no one likes is out --
- Jon Lovette/Getty Images
-
-
-
-
-
-
-
- US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated. -Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.” -Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.” -There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging. -Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM - |
- |||||||||||||||||||||||||||||||||
|
-
-
-
- FOOD & BEVERAGE-Starbucks puts the ‘mint’ in peppermint-
- Zhang Peng/Getty Images
-
-
-
-
-
-
-
- The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs. -The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary. -These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips. -Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune. -Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR - |
- |||||||||||||||||||||||||||||||||
|
-
-
- GRAB BAG-- - Key performance indicators - --
- Francis Scialabba
-
-
- Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed. -Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.” -The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016. -Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker) - |
- |||||||||||||||||||||||||||||||||
|
-
-
- WHAT ELSE IS BREWING-
-
-
|
- |||||||||||||||||||||||||||||||||
|
-
-
- BREW'S BETS-
-
- Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more. -Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing. -Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now. -Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.* -*This is sponsored advertising content. - |
- |||||||||||||||||||||||||||||||||
|
-
-
- GAMES-- - The puzzle section - --
-
- Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here. -Tagline trivia-There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film. -
|
- |||||||||||||||||||||||||||||||||
-
-
-
-
-
-
- Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here. -Check out more from the Brew: -
|
- |||||||||||||||||||||||||||||||||
|
-
-
- - - Answer - --
-
- 1. Cinderella -2. Office Space -3. The Social Network -4. The 40-Year-Old Virgin -5. My Cousin Vinny - |
- |||||||||||||||||||||||||||||||||
|
-
-
- ✢ A Note From Facet Wealth -Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice. -*Two months free offer is only valid for an annual fee paid at the time of signing. - |
- |||||||||||||||||||||||||||||||||
|
- Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt - -Was this email forwarded to you? Sign up here. - |
- |||||||||||||||||||||||||||||||||
|
- ADVERTISE // CAREERS // SHOP // FAQ
- Update your email preferences or unsubscribe here. Copyright © 2022 Morning Brew. All rights reserved. |
-
|
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
-
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
+