message: use utils.svgToDataUrl in mathpreview.ts
diff: @@ -135,7 +135,7 @@ export class MathPreview {
  })
  this.scaleSVG(data, scale)
  const xml = this.colorSVG(data.svgNode.outerHTML)
  - const md = this.svgToDataUrl(xml)
  + const md = utils.svgToDataUrl(xml)
  return new vscode.Hover(new vscode.MarkdownString(this.addDummyCodeBlock(`![equation](${md})`)), tex.range )
  }
  @@ -184,7 +184,7 @@ export class MathPreview {
  })
  this.scaleSVG(data, scale)
  const xml = this.colorSVG(data.svgNode.outerHTML)
  - const md = this.svgToDataUrl(xml)
  + const md = utils.svgToDataUrl(xml)
  const line = refData.position.line
  const link = vscode.Uri.parse('command:latex-workshop.synctexto').with({ query: JSON.stringify([line, refData.file]) })
  const mdLink = new vscode.MarkdownString(`[View on pdf](${link})`)
  @@ -237,12 +237,6 @@ export class MathPreview {
  svgelm.setAttribute('height', h + h0[2])
  }
  - private svgToDataUrl(xml: string): string {
  - const svg64 = Buffer.from(unescape(encodeURIComponent(xml)), 'binary').toString('base64')
  - const b64Start = 'data:image/svg+xml;base64,'
  - return b64Start + svg64
  - }
  -
  private hexToRgb(hex: string) {
  const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
  return result ? {
  