-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When used with a foreach. Only the first result has a rel= #13
Comments
Making class instance within the for-each loop will increase the memory used. But what happens when you do this? foreach ($posts as &$postItem) {
$Parsedown = new ParsedownExtraPlugin;
// ... your code goes here
} |
Hey, thanks for answering. Just tried it but its the same result. Updated my code to give you a full picture of what I am doing. |
Actually based on your answer, this works:
|
This seems to be caused by For quick fix, try to put this line next out of the |
I am using Parsedown to parse a text with links from MySQL.
As recommended in another answer on StackOverflow: https://stackoverflow.com/a/47148927/10415318 I am using the Parsedown Extra Plugin https://github.com/taufik-nurrohman/parsedown-extra-plugin
When doing the query and the foreach all I get is the first result to have a rel=ugc attribute, the other ones don't have it. The links render ok, just not the rel attribute.
Here is the PHP code I have:
The text was updated successfully, but these errors were encountered: