New to this forum and novice - help with a pattern please!

Hello lovely knitters!
I’ve just discovered this website whilst trying to decipher my pattern. I am making the buttonholes & the instructions read:

K1, YO, k2tog, (K to 1st before M, M1,K1, SM, K1, M1) four times, knit to last three stitches, k2tog, yo, k1

Now, this row if following previous sequence would have been a purl row but I have knitted 1, brought y to front and knitted two together and then knitted up to the stitch before the marker, and now I am confused as to what is next… help pls…

Ignore, I’ve worked it out!