You must use Google Docs built-in header styles for this to work ... you will have to edit the ToC manually. To do that, ...