Wendy's had preliminary merger talks with Papa John's before the company's founder, John Schnatter, stepped down as chairman last week, a source familiar with the situation told CNBC.

The talks cooled after Schnatter's use of a racially charged slur led to his resignation. Schnatter still sits on Papa John's board and has a nearly 30 percent stake in the company.

Shares of the pizza company jumped after the Wall Street Journal first reported news of the talks, and ended the day up 4 percent at $53.60.

The source requested anonymity because the information is confidential. Both Wendy's and Papa John's told CNBC they do not comment on market rumors or speculation. Representatives for Schnatter declined to comment.

The deal talks highlight the opportunity potential acquirers see in improving Papa John's technology and scaling up in a still fragmented pizza chain industry. Still, the public relations fall out that followed Schnatter's resignation is likely to complicate any potential deal.