Skip to content

Commit

Permalink
kroki: switch from native to js-base64 btoa
Browse files Browse the repository at this point in the history
  • Loading branch information
skrobul committed Jan 18, 2022
1 parent 4472b19 commit 6ab1b29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/actions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import Card from '$lib/components/card/card.svelte';
import { rendererUrl, krokiRendererUrl } from '$lib/util/env';
import { base64State, codeStore } from '$lib/util/state';
import { toBase64 } from 'js-base64';
import { toBase64, btoa as jsbtoa } from 'js-base64';
import moment from 'moment';
import pako from 'pako';
Expand Down Expand Up @@ -150,7 +150,7 @@
const getKrokiCode = (source) => {
const data = textEncode(source);
const compressed = pako.deflate(data, { level: 9, to: 'string' });
let result = btoa(compressed).replace(/\+/g, '-').replace(/\//g, '_');
let result = jsbtoa(compressed).replace(/\+/g, '-').replace(/\//g, '_');
return result;
};
Expand Down

0 comments on commit 6ab1b29

Please # to comment.