mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed problems with empty comment nodes generated by Terraform lexer
This commit is contained in:
parent
366a5ea3a4
commit
104c8c85e0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -214,7 +214,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.897f3768.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.703c595d.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 %}
|
||||||
|
@ -71,14 +71,15 @@ function findAnnotationMarkers(container: HTMLElement): Text[] {
|
|||||||
const markers: Text[] = []
|
const markers: Text[] = []
|
||||||
for (const comment of getElements(".c, .c1, .cm", container)) {
|
for (const comment of getElements(".c, .c1, .cm", container)) {
|
||||||
let match: RegExpExecArray | null
|
let match: RegExpExecArray | null
|
||||||
let text = comment.firstChild as Text
|
|
||||||
|
|
||||||
/* Split text at marker and add to list */
|
/* Split text at marker and add to list */
|
||||||
while ((match = /\((\d+)\)/.exec(text.textContent!))) {
|
let text = comment.firstChild as Text
|
||||||
const marker = text.splitText(match.index)
|
if (text instanceof Text)
|
||||||
text = marker.splitText(match[0].length)
|
while ((match = /\((\d+)\)/.exec(text.textContent!))) {
|
||||||
markers.push(marker)
|
const marker = text.splitText(match.index)
|
||||||
}
|
text = marker.splitText(match[0].length)
|
||||||
|
markers.push(marker)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return markers
|
return markers
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user