mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed inconsistency of code block sequence number in community edition and Insiders
This commit is contained in:
parent
c3ba161233
commit
5f02d02dc4
@ -175,7 +175,7 @@ You can cancel your sponsorship anytime.[^5]
|
|||||||
[![Datadog]](https://datadoghq.com/){ target=_blank title="Datadog" }
|
[![Datadog]](https://datadoghq.com/){ target=_blank title="Datadog" }
|
||||||
[![Zenoss]](https://zenoss.com/){ target=_blank title="Zenoss" }
|
[![Zenoss]](https://zenoss.com/){ target=_blank title="Zenoss" }
|
||||||
[![Elli]](https://www.elli.eco/en/home){ target=_blank title="Elli - A Brand of the Volkswagen Group" }
|
[![Elli]](https://www.elli.eco/en/home){ target=_blank title="Elli - A Brand of the Volkswagen Group" }
|
||||||
[![Posit]](docs.posit.co){ target=_blank title="Posit" }
|
[![Posit]](https://docs.posit.co){ target=_blank title="Posit" }
|
||||||
[![n8n]](https://n8n.io){ target=_blank title="n8n" }
|
[![n8n]](https://n8n.io){ target=_blank title="n8n" }
|
||||||
[![Dogado]](https://www.dogado.de){ target=_blank title="Dogado" }
|
[![Dogado]](https://www.dogado.de){ target=_blank title="Dogado" }
|
||||||
[![World Wide Technology]](https://wwt.com){ target=_blank title="World Wide Technology" }
|
[![World Wide Technology]](https://wwt.com){ target=_blank title="World Wide Technology" }
|
||||||
|
@ -40,7 +40,7 @@ Click on a tile to change the color scheme:
|
|||||||
button.addEventListener("click", function() {
|
button.addEventListener("click", function() {
|
||||||
var attr = this.getAttribute("data-md-color-scheme")
|
var attr = this.getAttribute("data-md-color-scheme")
|
||||||
document.body.setAttribute("data-md-color-scheme", attr)
|
document.body.setAttribute("data-md-color-scheme", attr)
|
||||||
var name = document.querySelector("#__code_1 code span.l")
|
var name = document.querySelector("#__code_0 code span.l")
|
||||||
name.textContent = attr
|
name.textContent = attr
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -95,7 +95,7 @@ Click on a tile to change the primary color:
|
|||||||
button.addEventListener("click", function() {
|
button.addEventListener("click", function() {
|
||||||
var attr = this.getAttribute("data-md-color-primary")
|
var attr = this.getAttribute("data-md-color-primary")
|
||||||
document.body.setAttribute("data-md-color-primary", attr)
|
document.body.setAttribute("data-md-color-primary", attr)
|
||||||
var name = document.querySelector("#__code_2 code span.l")
|
var name = document.querySelector("#__code_1 code span.l")
|
||||||
name.textContent = attr.replace("-", " ")
|
name.textContent = attr.replace("-", " ")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -152,7 +152,7 @@ Click on a tile to change the accent color:
|
|||||||
button.addEventListener("click", function() {
|
button.addEventListener("click", function() {
|
||||||
var attr = this.getAttribute("data-md-color-accent")
|
var attr = this.getAttribute("data-md-color-accent")
|
||||||
document.body.setAttribute("data-md-color-accent", attr)
|
document.body.setAttribute("data-md-color-accent", attr)
|
||||||
var name = document.querySelector("#__code_3 code span.l")
|
var name = document.querySelector("#__code_2 code span.l")
|
||||||
name.textContent = attr.replace("-", " ")
|
name.textContent = attr.replace("-", " ")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -126,7 +126,7 @@ Click on a tile to change the directionality:
|
|||||||
button.addEventListener("click", function() {
|
button.addEventListener("click", function() {
|
||||||
var attr = this.getAttribute("data-md-dir")
|
var attr = this.getAttribute("data-md-dir")
|
||||||
document.body.dir = attr
|
document.body.dir = attr
|
||||||
var name = document.querySelector("#__code_3 code span.l")
|
var name = document.querySelector("#__code_2 code span.l")
|
||||||
name.textContent = attr
|
name.textContent = attr
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -240,7 +240,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.8bbcded3.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.20c9977b.min.js' | url }}"></script>
|
||||||
{% for path in config.extra_javascript %}
|
{% for path in config.extra_javascript %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -177,7 +177,7 @@ export function mountCodeBlock(
|
|||||||
feature("content.code.copy") && !el.closest(".no-copy")
|
feature("content.code.copy") && !el.closest(".no-copy")
|
||||||
)) {
|
)) {
|
||||||
const parent = el.closest("pre")!
|
const parent = el.closest("pre")!
|
||||||
parent.id = `__code_${++sequence}`
|
parent.id = `__code_${sequence++}`
|
||||||
parent.insertBefore(
|
parent.insertBefore(
|
||||||
renderClipboardButton(parent.id),
|
renderClipboardButton(parent.id),
|
||||||
el
|
el
|
||||||
|
Loading…
Reference in New Issue
Block a user