Skip to content

Commit

Permalink
Fixed inconsistency of code block sequence number in community editio…
Browse files Browse the repository at this point in the history
…n and Insiders
  • Loading branch information
squidfunk committed Mar 19, 2023
1 parent c3ba161 commit 5f02d02
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/insiders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ You can cancel your sponsorship anytime.[^5]
[![Datadog]](https://datadoghq.com/){ target=_blank title="Datadog" }
[![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" }
[![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" }
[![Dogado]](https://www.dogado.de){ target=_blank title="Dogado" }
[![World Wide Technology]](https://wwt.com){ target=_blank title="World Wide Technology" }
Expand Down
6 changes: 3 additions & 3 deletions docs/setup/changing-the-colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Click on a tile to change the color scheme:
button.addEventListener("click", function() {
var attr = this.getAttribute("data-md-color-scheme")
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
})
})
Expand Down Expand Up @@ -95,7 +95,7 @@ Click on a tile to change the primary color:
button.addEventListener("click", function() {
var attr = this.getAttribute("data-md-color-primary")
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("-", " ")
})
})
Expand Down Expand Up @@ -152,7 +152,7 @@ Click on a tile to change the accent color:
button.addEventListener("click", function() {
var attr = this.getAttribute("data-md-color-accent")
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("-", " ")
})
})
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/changing-the-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Click on a tile to change the directionality:
button.addEventListener("click", function() {
var attr = this.getAttribute("data-md-dir")
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
})
})
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
</script>
{% endblock %}
{% 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 %}
<script src="{{ path | url }}"></script>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/javascripts/components/content/code/_/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export function mountCodeBlock(
feature("content.code.copy") && !el.closest(".no-copy")
)) {
const parent = el.closest("pre")!
parent.id = `__code_${++sequence}`
parent.id = `__code_${sequence++}`
parent.insertBefore(
renderClipboardButton(parent.id),
el
Expand Down

0 comments on commit 5f02d02

Please sign in to comment.