Skip to content

Commit 104c8c8

Browse files
committed
Fixed problems with empty comment nodes generated by Terraform lexer
1 parent 366a5ea commit 104c8c8

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

material/assets/javascripts/bundle.897f3768.min.js renamed to material/assets/javascripts/bundle.703c595d.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/javascripts/bundle.897f3768.min.js.map renamed to material/assets/javascripts/bundle.703c595d.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
</script>
215215
{% endblock %}
216216
{% block scripts %}
217-
<script src="{{ 'assets/javascripts/bundle.897f3768.min.js' | url }}"></script>
217+
<script src="{{ 'assets/javascripts/bundle.703c595d.min.js' | url }}"></script>
218218
{% for path in config["extra_javascript"] %}
219219
<script src="{{ path | url }}"></script>
220220
{% endfor %}

src/assets/javascripts/components/content/annotation/list/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ function findAnnotationMarkers(container: HTMLElement): Text[] {
7171
const markers: Text[] = []
7272
for (const comment of getElements(".c, .c1, .cm", container)) {
7373
let match: RegExpExecArray | null
74-
let text = comment.firstChild as Text
7574

7675
/* Split text at marker and add to list */
77-
while ((match = /\((\d+)\)/.exec(text.textContent!))) {
78-
const marker = text.splitText(match.index)
79-
text = marker.splitText(match[0].length)
80-
markers.push(marker)
81-
}
76+
let text = comment.firstChild as Text
77+
if (text instanceof Text)
78+
while ((match = /\((\d+)\)/.exec(text.textContent!))) {
79+
const marker = text.splitText(match.index)
80+
text = marker.splitText(match[0].length)
81+
markers.push(marker)
82+
}
8283
}
8384
return markers
8485
}

0 commit comments

Comments
 (0)