Luke
Luke 7:39ESV·traditional attribution

Now when the Pharisee who had invited him saw this, he said to himself, “If this man were a prophet, he would have known who and what sort of woman this is who is touching him, for she is a sinner.”

Matthew Henry Presbyterian @wholebiblehenry

When and where this passage of story happened does not appear; this evangelist does not observe order of time in his narrative so much as the other evangelists do; but it comes in here, upon occasion of Christ's being reproached as a friend to publicans and sinners, to show that it was only for their good, and to bring them to repentance, that he conversed...

Commenting on Luke 7:36-50

John Gill Reformed Baptist @doctorgill

Simon answered and said,.... Very readily, without any hesitation, not being aware of the application of it, to the instance he had been pondering in his mind: I suppose, that he to whom he forgave most; it was his opinion, and to him a plain case, that he that owed the largest debt, and that being forgiven him fully, and freely, as he was under...

Albert Barnes Presbyterian @notesbybarnes

Verse 39. He spake within himself. Thought. If he were a prophet. The word prophet here means, not one who predicts future events, but one who knows the hearts of men. If Jesus had been sent from God as a prophet, he supposed that he would have known the character of the woman and would have rebuked her. Would have known, etc.