mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-04 15:17:59 +03:00
refactoring
This commit is contained in:
parent
2aa0d69b1f
commit
0a1f3acc7f
@ -56,9 +56,8 @@ const svgAsyncToPngDataUrl = function (svgdataurl) {
|
||||
ctx.fillStyle = "rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ")";
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
ctx.drawImage(img, 0, 0);
|
||||
const ret = canvas.toDataURL("image/png");
|
||||
img.src = "";
|
||||
return ret;
|
||||
return canvas.toDataURL("image/png");
|
||||
});
|
||||
}
|
||||
|
||||
@ -85,8 +84,6 @@ const setMathInDiv = function (divid, tmpid) {
|
||||
|
||||
const setVSCodeForegroundColor = function(tex) {
|
||||
const rgb = getVSCodeEditorForegound();
|
||||
console.log("hoge: " + rgb[0]);
|
||||
console.log(`${rgb[0]},${rgb[1]},${rgb[2]}`);
|
||||
return tex.replace(/^(\$|\\\(|\\begin{.*?})/, '$1\\color[RGB]{' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + '}');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user