A pulse edge has a very high (fourier) frequency associated with it, approximately 0.35/Tr, where Tr is the edge rise-time. Thus the edge goes through the capacitor with no significant phase delay or attenuation. But the flat part of the pulse looks like a low frequency which causes the resistor-capacitor combination to generate an exponential decay of the voltage toward the DC level. Therefore the positive going pulse edge (0 to V+) will generate a positive output spike decaying to the DC level, and the negative going edge (V+ to 0) will generate a negative output spike, also decaying to the DC level.