I was recently taught that the Peano curve is an example of a continuous bijection from the closed unit interval to the closed unit square. However, if we take a point in the square and take it's preimage in the interval and delete both points, the interval gets disconnected while the square remains connected. How can such a function be continuous? As continuous maps preserve connectedness, there should be no continuous bijection between the unit interval and the unit square, yet the Peano curve is supposedly such an example. Where am I going wrong?