LEGO Mindstorm EV3 Line-With-Gaps Follower? [Robotc]
As you already have a working program for the continuous line, you just need to add provisions for the cases when

(the robot is moving on a straight part) AND (the color sensor finds a gap in the track)


Depending on your existing solution you might need to code dedicated methods to identify the two sub-cases and then call them repeatedly to see if the robot is


on the track, 
off the track or 
in a gap but on the track.


The above mentioned provision could include just "hold the current direction and continue forwards" or something more elaborate. It could include measuring the distance traveled and seeing if the gap is indeed shorter than 20 cm (and trying to find the line again if a longer gap was found), or introducing a slight fanning motion to help find the end of the gap, or maybe something completely different.

If you post more about your existing solution, we could give you more specific ideas.