Preheat the oven to 180ºC, and line a 20 cm square baking tin with baking parchment.
Stone the cherries, then cut the flesh in half.
Gently melt the chocolate and sugar together in a heatproof bowl set over a pan of simmering water. Remove from the heat and add the butter. Mix well until you get a thick, smooth cream.
Add the flour, baking powder and vanilla or liqueur. Stir, then add the eggs gradually. Fold in the cherries gently.
Spoon the mixture into the baking tin and bake for 20–25 minutes. It must not be overcooked because the middle should remain a bit gooey.
Leave the cake to cool in the tin for 5 minutes, then turn it out onto a wire rack. When it's cooled completely, cut it into squares.