Skip to content

Commit

Permalink
Fix tab-example
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 authored Dec 12, 2024
1 parent ceaf9d2 commit ed276da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 10 additions & 2 deletions _includes/code/mobile-sdk.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@
</ul>
<div class="tab-content" id="code-tab-content">
<div class="tab-pane fade show active" id="{{ include.id }}-kotlin" role="tabpanel" aria-labelledby="{{ include.id }}-kotlin-tab">
{{ include.kotlin | markdownify }}
<div class="highlight">
<pre class="highlight language-kotlin">
<code class="language-kotlin">{{ include.kotlin | xml_escape }}</code>
</pre>
</div>
</div>
<div class="tab-pane fade" id="{{ include.id }}-swift" role="tabpanel" aria-labelledby="{{ include.id }}-swift-tab">
{{ include.swift | markdownify }}
<div class="highlight">
<pre class="highlight language-swift">
<code class="language-swift">{{ include.swift | xml_escape }}</code>
</pre>
</div>
</div>
</div>
12 changes: 6 additions & 6 deletions docs-examples/tab-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ The prebid documentation uses bootstrap for styling. Bootstrap offers a [tab com

## Example

{% capture iosCode %}struct Player {
{% capture iosCode %}
struct Player {
var name: String
var highScore: Int = 0
var history: [Int] = []
Expand All @@ -20,18 +21,17 @@ The prebid documentation uses bootstrap for styling. Bootstrap offers a [tab com
}
}

var player = Player("Tomas")
{% endcapture %}
var player = Player("Tomas"){% endcapture %}

{% capture androidCode %}fun main() {
{% capture androidCode %}
fun main() {
val name = "stranger" // Declare your first variable
println("Hi, $name!") // ...and use it!
print("Current count:")
for (i in 0..10) { // Loop over a range from 0 to 10
print(" $i")
}
}
{% endcapture %}
}{% endcapture %}

{% include code/mobile-sdk.html id="hello-world" kotlin=androidCode swift=iosCode %}

Expand Down

0 comments on commit ed276da

Please sign in to comment.