Better context tag capturing

Now it can correctly parse attributes with single quotes