Archived
1
0
Fork 0
This repository has been archived on 2024-10-19. You can view files and clone it, but cannot push or open issues or pull requests.
emacs/code/elpa/lsp-ui-20240514.1943/lsp-ui-doc.html

53 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2024-07-28 16:03:37 +00:00
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.10.0/github-markdown.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css">
<style>
:root {
--webkit-max-width-px: 600px;
}
.markdown-body {
box-sizing: border-box;
min-width: var(--webkit-max-width-px);
max-width: var(--webkit-max-width-px);
margin: 0 auto;
padding: 10px;
}
.markdown-body pre code {
white-space: pre-wrap;
}
</style>
</head>
<body>
<div id="lsp-ui-webkit" class="markdown-body">
</div>
<script>
var converter = new showdown.Converter({simpleLineBreaks: true});
var lastSymbol = "";
var elem = document.getElementById('lsp-ui-webkit');
function renderMarkdown(symbol, markedString) {
if (symbol == lastSymbol) return [elem.offsetWidth, elem.offsetHeight];
decodedString = decodeURIComponent(markedString);
html = converter.makeHtml(decodedString);
elem.innerHTML = html;
lastSymbol = symbol;
document.querySelectorAll('pre code').forEach(function(codeBlock) {
hljs.highlightBlock(codeBlock);
});
return [elem.offsetWidth, elem.offsetHeight];
}
</script>
</body>
</html>