Fixed formatSidenote function so that data-ref attribute is added to sidenote instead of ref-mark