nodes
nodes: object[] = [{kind: 'block',type: 'line',isVoid: false,data: {},nodes: [{kind: 'text',leaves: [{kind: 'leaf',text: 'The value of custom is: ',marks: []}]},{kind: 'inline',type: 'mention-inline-node',isVoid: false,data: {completed: true,option: {id: '627a43be-4675-4b98-84a7-537262561be6',name: 'custom'}},nodes: [{kind: 'text',leaves: [{kind: 'leaf',text: '$custom',marks: []}]}]},{kind: 'text',leaves: [{kind: 'leaf',text: '',marks: []}]}]}]
Given node return filter out optional nodes without matching values provided
E.g. You are welcome[, $name] -> You are welcome