Water heater/gas fireplace vent in common

Electric water heater replaced with gas appliance and new flue run across ~10 ft to connect in with a vented gas fireplace flue. This would NOT be allowed if wood burning, but is it allowed with both being gas fired appliances (similar to furnaces?). There’s just something wrong looking about it and I can’t find any code reference in my Check Code books. Thanks.