build_doc: fix a syntax error

This was introduced in #7787.