I've adjusted the regexes in the extractStep function, so it will now spot a space in front of a [attr=value] block and handle that as a separate step, rather than joining it to the previous.
I also noticed that when walking through the steps, the assessPath method was starting a test on the current node, not on the nodes beneath.
I've adjusted the regexes in the extractStep function, so it will now spot a space in front of a [attr=value] block and handle that as a separate step, rather than joining it to the previous.
I also noticed that when walking through the steps, the assessPath method was starting a test on the current node, not on the nodes beneath.
This is a fix for issue https://github.com/goofballLogic/ld-query/issues/17