Yoast / YoastSEO.js

Analyze content on a page and give SEO feedback as well as render a snippet preview.
GNU General Public License v3.0
403 stars 170 forks source link

subheadingDistribution fails to mark text #645

Closed IreneStr closed 4 years ago

IreneStr commented 8 years ago

What did you expect to happen?

Paragraphs to be marked after hitting the button after "1 of the subheadings is followed by more than the recommended maximum of 300 words. Try to insert another subheading." .

What happened instead?

Nothing happened when I clicked the mark subheadingDiscribution button.

How can we reproduce this behavior?

Use this text and hit the mark subheadingDiscribution button:

Hillary Clinton has cemented her status as the Democratic nominee for president with convincing primary wins in California, New Jersey and New Mexico, calling on supporters of her rival, Bernie Sanders, to unite behind her historic candidacy.

But on a night when it became clear that Clinton would secure a majority of pledged delegates, Sanders refused to bow out, telling supporters that their fight would continue to the Democratic National Convention in July.

The senator’s defiant remarks came after Clinton effectively declared victory in her overall battle against Sanders at a rally in New York.

Clinton told supporters that she had “reached a milestone” as the first woman to be a major party’s nominee for president, and immediately framed November’s general election as a contest between two opposing visions of the future.

“He’s not just trying to build a wall between America and Mexico, he’s trying to wall off Americans from each other,” Clinton said, taking aim at the policies and slogans that have become the hallmark of her Republican rival, Donald Trump. “When he says let’s make America great again, that is code for let’s take America backwards.”

In her speech, Clinton praised Sanders for exciting “millions of voters, especially young people” in what she said was an “extraordinary campaign”.

“I know it never feels good to put your heart into a cause or a candidate you believe in and come up short,” she said, referring to her defeat to Barack Obama in 2008. “I know that feeling well.”

Sanders had been pinning his hopes on an upset in California, the most delegate-rich contest on the primary calendar, and one where polls had recently shown him neck and neck against Clinton. But on Wednesday, with 91.7% of precincts reporting, Clinton had 56% and Sanders 43% of the vote, Associated Press reported.

She had also won New Jersey, New Mexico and South Dakota, while Sanders had triumphed in North Dakota and Montana.

On the Republican side, Trump remained mired in a remarkable clash with the most senior members of his party, including the leaders of the House and the Senate, some of whom were effectively accusing the nominee they have just endorsed of outright racism.

The senator from Vermont, his voice hoarse, struggled to be heard above screaming supporters in Santa Monica. “We are going to fight hard to win the primary in Washington DC,” he said, referring to the caucus that is last in line to vote next week.

Promising to continue all the way to the July convention, he added: “And then we take our fight for social, economic, racial and environmental justice to Philadelphia.”

However, the short speech from Sanders, amid reports that he plans to lay off up to half his staff on Wednesday, added to the expectation that his campaign may soon wind down.

Obama, who is said to be planning to endorse Clinton in the coming days, is expected to play a mediating role between the Democratic adversaries after their bruising campaigns. The president called both candidates after polls had closed, the White House said, and plans to meet with Sanders on Thursday.

Clinton claimed the mantle of the Democratic nominee exactly eight years to the day after she conceded defeat in her campaign against then senator Obama, memorably telling supporters that she had fallen short in her quest to shatter “that highest, hardest glass ceiling”.

On Tuesday, she returned to that metaphor, telling ecstatic supporters that the ceiling above them, in the Brooklyn Navy Yard, was made of glass. “But don’t worry,” she said. “We’re not smashing this one. Thanks to you, we’ve reached a milestone. The first time in our nation’s history that a woman will be a major party’s nominee.”

Clinton also used her address to call for unity behind a campaign to stop a “temperamentally unfit” Trump from becoming commander-in-chief.

“When Trump says a distinguished judge born in Indian can’t do his job because of his Mexican heritage, or he mocks a reporter with disabilities, or calls women ‘pigs’, it goes against everything we stand for,” Clinton said.

“Donald Trump attacked the press for asking tough questions, denigrated Muslims and immigrants. He wants to win by stoking fear and rubbing salt in wounds.”

However, Clinton’s quest to win over Sanders supporters will not be easy. Many see her as emblematic of a political system corrupted by corporate influence and the beneficiary of a Democratic establishment that has has conspired to ensure she becomes the nominee.

When Sanders mentioned that he had received a “very gracious call” from Clinton, and congratulated her on her primary wins, the crowd erupted in boos until he raised his hand as if to quieten them.

“Our fight is to transform this country and to understand that we are in this together,” Sanders said.

<h2>Trump tries to lure Sanders supporters</h2>
Trump, who like Sanders is an anti-establishment candidate who ostensibly claimed to eschew money from corporate interests and lambasted America’s trade deals, immediately moved to lure some of his disaffected supporters.

Appearing at a news conference at his golf club in Westchester, New York, Trump said he had reached his own historic milestone, receiving “more votes than any other GOP campaign in history” and made a direct appeal to Sanders voters.

“The terrible trade deals that Bernie was so vehemently against – and he’s right on that – will be taken care of far better than anyone ever thought possible,” Trump said. “For all of those Bernie Sanders voters who will be left out in the cold by a rigged system of superdelegates, we welcome you with open arms.”

For months, Sanders and his backers have complained about the role of superdelegates, who are party officials that are granted a vote at the convention in July, where the party’s nominee is formally appointed.

Sanders supporters were furious on Monday when the Associated Press and other media outlets declared Clinton the presumptive nominee after she quietly acquired a slew of new superdelegate supporters. The Sanders campaign dismissed the declaration as premature, pointing out that those superdelegates could change their mind before the convention.

It was unclear late on Tuesday whether Clinton would clinch the nomination with pledged delegates alone.

However, her majority in pledged delegates undercut Sanders’ principal argument; if he is to become the nominee, it is now the Vermont senator who would need the help of party officials to overrule the popular will of voters and reach the 2,383 delegates needed.

On Tuesday at least, Sanders appeared undeterred, arguing he had won 22 state contests and received more than 10m votes. “I am pretty good in arithmetic, and I know the fight in front of us is a very, very, steep fight,” he said. “But we will continue to fight for every vote and every delegate.”

Sanders’ speech concluded one of the most eventful days in what has already proven a remarkable, generation-defining year in politics.

As voters flocked to the polls in both Democratic and Republican primaries, the GOP’s nominee-in-waiting faced a remarkable chorus of condemnation from the most senior members of his party over his claim that a judge of Mexican heritage could not judge him fairly.

His claims about the judge were described as “the textbook definition of a racist comment” by Paul Ryan, the House speaker, while the Senate majority leader, Mitch McConnell, called on Trump to “quit attacking” minorities.

Mark Kirk, a Republican seeking re-election in Illinois in November, became the first senator to withdraw his previous support for the GOP nominee. An Iowa state senator became the first elected official to leave the Republican party over Trump, likening the presumptive nominee’s campaign to the rise of Adolf Hitler.

Throughout the day, Trump stood firm, refusing to give in to mounting calls for him to retract his remarks. Instead, he released a statement that it was “unfortunate” that his comments had been “misconstrued as a categorical attack against people of Mexican heritage”.

He added: “I am friends with and employ thousands of people of Mexican and Hispanic descent.”

At his news conference in New York, Trump did not take questions from reporters, choosing instead to read scripted lines from a teleprompter. “I will make you proud of the party,” Trump said. “For those who voted for someone else, in either party, I will work hard to earn your support.”

Turning to his newly anointed Democratic adversary, Trump suggested Clinton’s management of her family foundation was corrupt.

“The Clintons have turned the politics of personal enrichment into an art form for themselves, he said promising a speech about the Clintons next week, probably Monday,” he said. “I think you’re going to find it very informative.”

Additional reporting by Maria L La Ganga in San Francisco; Rory Carroll in Los Angeles; Sabrina Siddiqui and Dan Roberts in Washington; and Amber Jamieson in New York

Additional info

In the browserified standalone the paragraphs are marked correctly.

Technical info

IreneStr commented 6 years ago

The same goes for the paragraph length assessment. This probably has something to do with minor differences between the marked text and the original text.

michielheijmans commented 6 years ago

I had this same issue with the first paragraph of an article. The heading that's above that is the actual title of the post. Here's the paragraph:

Suppose you know nothing about SEO but have heard about this little gem called Yoast SEO. People told you that it is a very convenient way to optimize your site and it's pages for Google, Bing, and Yandex. It's effortless. You want to use it. You install the <a href="https://yoast.com/wordpress/plugins/seo/">Yoast SEO plugin</a> or the <a href="https://yoast.com/yoast-seo-for-magento2-and-typo3/">Yoast SEO extension</a>, and simply follow the advice given in that plugin. Within a week, your website will be topping the charts in Google.
Or not? No, to be honest. It's not that simple. Our plugin provides guidance for optimization of your website for search engines. A good one, but it needs your input.
In this beginner's guide to Yoast SEO, I'll try to explain the basics of SEO that our plugin guides you in. I'll take you on a small trip every user that tries our plugin for the first time takes, and help you optimize your own site in the process.
IreneStr commented 4 years ago

Closing because we no longer mark subheading distribution. This functionality was removed in Yoast SEO 9.2