Replacement for getStringContent
method?
#714
-
Hello! Currently I'm in the middle of upgrading commonmark from v1.6 to v2.0 for osu-web project. I notice in our codebase, there's this line of code Previously in v1.6, In v2.0, I already read the documentation and also dive into commonmark codebase itself but can't find any replacement for that method. Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In 2.0 we no longer store the text contents directly on the parent use League\CommonMark\Node\StringContainerHelper;
// ...
$text = StringContainerHelper::getChildText($this->node); |
Beta Was this translation helpful? Give feedback.
In 2.0 we no longer store the text contents directly on the parent
Heading
block node but rather inside of its children nodes. The easiest way to extract that text in 2.0 would be with theLeague\CommonMark\Node\StringContainerHelper
class like this: