mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-10 22:55:00 +00:00

# Aider chat conversation: USER: also load https://cdn.jsdelivr.net/npm/marked/marked.min.js ASSISTANT: To load the `marked.min.js` library from the CDN, we need to add a script tag in the `index.md` file. Here is the change: ```markdown share/index.md <<<<<<< ORIGINAL <script> window.onload = function() { ======= <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script> window.onload = function() { >>>>>>> UPDATED ``` This change adds a new script tag before the existing script tag. The new script tag loads the `marked.min.js` library from the CDN. The existing script tag remains unchanged.
30 lines
954 B
Markdown
30 lines
954 B
Markdown
|
|
# Shared aider chat transcript
|
|
|
|
A user has shared the following transcript of a pair programming chat session
|
|
created using <a href="https://aider.chat">aider</a>.
|
|
|
|
<div class="chat-transcript">
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
<script>
|
|
window.onload = function() {
|
|
var urlParams = new URLSearchParams(window.location.search);
|
|
var conv = urlParams.get('mdurl');
|
|
fetch(conv)
|
|
.then(response => response.text())
|
|
.then(markdown => {
|
|
// Ensure every line that starts with '>' ends with exactly 2 spaces
|
|
markdown = markdown.split('\n').map(function(line) {
|
|
if (line.startsWith('>')) {
|
|
return line.trimEnd() + ' ';
|
|
}
|
|
return line;
|
|
}).join('\n');
|
|
var html = marked.parse(markdown);
|
|
var divElement = document.querySelector('.chat-transcript');
|
|
divElement.innerHTML = html;
|
|
});
|
|
}
|
|
</script>
|