I'm not aware of laws that punish the syphilitic in particular; it would seem unlikely, since from roughly the early 19th century to 1905, it was understood that while syphilis was most infectious when patients can the primary lesion of the chancre, people could still be infectious years later, and it was not always clear when or if they were cured. This is an article in JAMA in 1887 trying to use what counted as the best medical information of the day to come up with an educated decision on when syphilitics could marry.
But in 1905, something quite interesting happened -- the Wassermann reaction, essentially a complement-fixation test, was invented, a serum test for syphilis. Rapidly, states passed "marriage laws" -- you would need to get a blood test (the Wassermann initially, replaced by the VDRL in the late 30s), and you would not be allowed to marry if positive until you were treated AND converted to negative. These were VERY common ( https://vdarchive.newmedialab.cuny.edu/files/original/08f46e2d5811f6852695f72a4c9eb9da.jpg for a map of states). Unfortunately, by the 1910s, it had become quite clear that there was a high false positive rate on the test (that is, while it was sensitive, it wasn't particularly specific) -- but the test kept getting used.