Regression: Fix extraction of section heading in preview

Update hacky code in preview that extracts the section heading

Change-Id: Ic3f8a222983989c8949a863d96e7952f16f99c13
Merge "Regression: Fix extraction of section heading in preview"