Hi!
Perhaps you are satisfied with the way discussed earlier. I have an alternative solution for those who are interested.
I also had the need to make two versions of a document where most of the contents are the same. My solution was to have single file and where needed write like this:
<<< internal
Contents here will be in *internal* version. You may include any valid markdown here.
<<< external
... For external version ...
>>>
The attached bash script will parse the file and depending on targeting internal or external version (or whatever identifiers you prefer) two different intermediate files will be created and then processed by pandoc.
This is the way I solved it and if you find it useful for your needs, please use it!
Regards
Hans