Added scope handling for regular html files and html.twig files