Keep writing doc and enhance the menu's headings detection