Implement marker folding