Skip to content

Commit

Permalink
Add WaveDrom version to WaveJSON metadata tag in SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
bmpenuelas committed Jun 22, 2022
1 parent 810bdec commit 6c6e053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/append-save-as-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function appendSaveAsDialog (index, output, obj=undefined) {
}
html = [div.innerHTML.slice(0, 166), html, div.innerHTML.slice(166)].join('');
if (obj) {
metadataWaveJSON = '<metadata id="wavejson">' + JSON.stringify(obj, null, 2) + '</metadata>';
metadataWaveJSON = '<metadata id="wavejson" version="' + window.WaveDrom.version + '">' + JSON.stringify(obj, null, 2) + '</metadata>';
html = html.replace('>', '>' + metadataWaveJSON);
}
svgdata = 'data:image/svg+xml;base64,' + btoa(html);
Expand Down

0 comments on commit 6c6e053

Please sign in to comment.