extract accept negotiation code from md doc