(content)
| 652 | } |
| 653 | |
| 654 | function downloadMarkdownFile(content) { |
| 655 | const filename = generateFilename(content) + '.md'; |
| 656 | const blob = new Blob([content], { type: 'text/markdown;charset=utf-8' }); |
| 657 | const url = URL.createObjectURL(blob); |
| 658 | const link = document.createElement('a'); |
| 659 | link.href = url; |
| 660 | link.download = filename; |
| 661 | document.body.appendChild(link); |
| 662 | link.click(); |
| 663 | document.body.removeChild(link); |
| 664 | URL.revokeObjectURL(url); |
| 665 | } |
| 666 | |
| 667 | function generateFilename(content) { |
| 668 | return window.DeepShareUtils.generateFilename(content, { |
no test coverage detected