I have a friend who insists that
if the liking is still taking place. But to my ear, only the latter (#2) sounds correct.
Which of the above (if any) is correct and why?
Trust your ear. :)
Your ear knows. As in all things dealing with today's English, we native English speakers know what sounds right and what sounds wrong -- but it can be hard to explain the grammar of the why of it all.
Generally, your version #2 is the preferred version, for it is the speaker's knowing that is foregrounded, while the info of your liking her is backgrounded. That is, previously the speaker didn't know that you liked her, but now the speaker does know. And that is what version #2 is doing, foregrounding the speaker's knowing, and backgrounding the info of your liking her by backshifting the verb "like" into "liked".
(Version #1 would be used if, for some reason, the speaker wanted to foreground the info that you like the girl. But that is rather unlikely for the example sentence in the usual context.)
LONG VERSION: (Note: "preterite" == a past tense form of a verb)
The preterite has three main uses:
- past time,
- modal remoteness,
Your example illustrates a backshifting use. Backshifting is often used in indirect reported speech, e.g. "Jill said she had too many commitments" when Jill's original utterance was "I have too many commitments" -- notice how Jill's present-tense "have" was backshifted into the preterite "had".
Backshifting in a subordinate clause can occur when either one of the following conditions is true:
In your example:
- "I didn't know you like/liked her"
the matrix clause's verb is "did", which is a past tense verb form, and so, it fulfills the above #A. (The matrix clause also fulfills #B, in that the situation of the speaker not knowing was in the past time sphere.)
And so, a backshifted preterite can occur. But then there is the question of preference, and even the question of obligatory vs optional backshifting.
Your example sentence seems to me to be an illustration of where there would be a strong preference for a backshifted version. Your example seems very similar to,
which is discussed in the 2002 reference grammar by Huddleston and Pullum et al., The Cambridge Grammar of the English Language (CGEL), pages 157-8:
(c) Focus on original
If the focus is on the original utterance or belief, with a contrast between 'then' and 'now', this will favor the backshifted version:
- I thought it [was] mine. -- (backshifted)
One context of this is where it has just been established that it is mine: thought would here be strongly stressed, indicating a contrast between past thinking and present knowing (of the same proposition). Another context is where it has just been established (or claimed) that it is not mine: here the contrast is between what I thought in the past and what is known/claimed in the present. In either case the past time location of the thinking is foregrounded, focused, and this favors the backshifted version, preserving the original T-o: deictic is would hardly be possible here.