Try bin/parse.php on this snippet
{| | foo | [[File:54 us house membership.png|thumb|450px| {| | bar |} ]] |}
Found via visualdiff testing -- see output of https://en.wikipedia.org/api/rest_v1/page/html/United_States_House_of_Representatives_elections_in_Massachusetts%2C_1894