If there is text and link in one field, then text is ignored, and just link is returned. For instance getting MacGyver's nuber of episodes that looks like this in Wiki Markdown:
num_episodes = 139 ([[List of MacGyver episodes|List of episodes]])<br />2 TV [[List of MacGyver episodes#TV Movies|films]]
returns array of objects like this:
[ { type: 'link',
text: 'List of episodes',
url: 'http://en.wikipedia.org/wiki/List of MacGyver episodes' },
{ type: 'link',
text: 'films',
url: 'http://en.wikipedia.org/wiki/List of MacGyver episodes#TV Movies' } ]
If doesn't include text nodes there. Expected result should be:
If there is text and link in one field, then text is ignored, and just link is returned. For instance getting MacGyver's nuber of episodes that looks like this in Wiki Markdown:
num_episodes = 139 ([[List of MacGyver episodes|List of episodes]])<br />2 TV [[List of MacGyver episodes#TV Movies|films]]
returns array of objects like this:If doesn't include text nodes there. Expected result should be:
The change should be made in stringToObject function.