For internal documentation I've found wikis to be quite useful. A wiki has several useful features for this task:
doc can be structured as several pages (e.g. one per major section) for easier management; individual pages can then be edited without any need to merge changes into a master document
some (most?) wiki platforms detect ...
This is a close duplicate of Does DRY (Don't Repeat Yourself) Apply to Documentation?
My short answer is do what's right for the user, not yourself. That's probably repeating the code, especially if there's extra or modified steps included. You'll lose the user along the way.
My long answer is that this is a also a good case of writers needing to push back ...