Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit ab8af90

Browse files
Merge pull request #430 from deckgo/fix-highlight
fix(#423): not displayed place holder
2 parents bf862f1 + 6de9d3d commit ab8af90

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

webcomponents/highlight-code/src/components/highlight-code/deckdeckgo-highlight-code.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ export class DeckdeckgoHighlightCode {
181181
return new Promise<void>(async (resolve, reject) => {
182182
const container: HTMLElement = this.el.shadowRoot.querySelector('div.deckgo-highlight-code-container');
183183

184+
if (!code || code === undefined || code === '') {
185+
resolve();
186+
return;
187+
}
188+
184189
if (container) {
185190
try {
186191
// clear the container first

webcomponents/highlight-code/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ <h1>Without line numbers</h1>
131131
</deckgo-highlight-code>
132132

133133
<h1>Issue #423</h1>
134-
<deckgo-highlight-code language="java" highlight-lines="6,7">
134+
<deckgo-highlight-code language="java" highlight-lines="6,7 13,14">
135135
<code slot="code"># main.tf
136136

137137
resource "aws_lambda_function" "api" {

0 commit comments

Comments
 (0)