@@ -25,10 +25,10 @@ public function __construct(
2525 ) {
2626 }
2727
28- public function isFlowNodeSupported (DOMElement $ node ): bool
28+ public function isFlowNodeSupported (DOMElement $ node, Context $ context ): bool
2929 {
3030 foreach ($ this ->nodeParsers as $ nodeParser ) {
31- if ($ nodeParser instanceof FlowNodeParser && $ nodeParser ->isFlowNodeSupported ($ node )) {
31+ if ($ nodeParser instanceof FlowNodeParser && $ nodeParser ->isFlowNodeSupported ($ node, $ context )) {
3232 return true ;
3333 }
3434 }
@@ -44,18 +44,21 @@ public function isFlowNodeSupported(DOMElement $node): bool
4444 public function parseFlowNode (DOMElement $ node , Context $ context ): array
4545 {
4646 foreach ($ this ->nodeParsers as $ nodeParser ) {
47- if ($ nodeParser instanceof FlowNodeParser && $ nodeParser ->isFlowNodeSupported ($ node )) {
47+ if ($ nodeParser instanceof FlowNodeParser && $ nodeParser ->isFlowNodeSupported ($ node, $ context )) {
4848 return $ nodeParser ->parseFlowNode ($ node , $ context );
4949 }
5050 }
5151
5252 return [];
5353 }
5454
55- public function isPhrasingNodeSupported (DOMElement |DOMText $ node ): bool
55+ /**
56+ * @param Context<mixed> $context
57+ */
58+ public function isPhrasingNodeSupported (DOMElement |DOMText $ node , Context $ context ): bool
5659 {
5760 foreach ($ this ->nodeParsers as $ nodeParser ) {
58- if ($ nodeParser instanceof PhrasingNodeParser && $ nodeParser ->isPhrasingNodeSupported ($ node )) {
61+ if ($ nodeParser instanceof PhrasingNodeParser && $ nodeParser ->isPhrasingNodeSupported ($ node, $ context )) {
5962 return true ;
6063 }
6164 }
@@ -70,7 +73,7 @@ public function parsePhrasingNode(
7073 Context $ context
7174 ): void {
7275 foreach ($ this ->nodeParsers as $ nodeParser ) {
73- if ($ nodeParser instanceof PhrasingNodeParser && $ nodeParser ->isPhrasingNodeSupported ($ node )) {
76+ if ($ nodeParser instanceof PhrasingNodeParser && $ nodeParser ->isPhrasingNodeSupported ($ node, $ context )) {
7477 $ nodeParser ->parsePhrasingNode ($ node , $ stringBuilder , $ attributes , $ context );
7578 return ;
7679 }
0 commit comments