File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ object hello {
30
30
```
31
31
> In this code, we defined a method named ` main ` , inside a Scala ` object ` named ` hello ` .
32
32
> An ` object ` in Scala is similar to a ` class ` , but defines a singleton instance that you can pass around.
33
- > ` main ` takes an input parameter named ` args ` that must be typed as ` Array[String] ` , (ignore it for now).
33
+ > ` main ` takes an input parameter named ` args ` that must be typed as ` Array[String] ` , (ignore ` args ` for now).
34
34
35
35
{% endtab %}
36
36
Original file line number Diff line number Diff line change 122
122
left : -999em ;
123
123
}
124
124
}
125
+
126
+ blockquote {
127
+ border : none ;
128
+ border-left : 4px solid $base-border-color-gray ;
129
+ padding : 4px 20px ;
130
+ }
125
131
}
126
132
127
133
.tabsection >input :nth-child (1 ):checked ~.tabcontent section :nth-child (1 ),
Original file line number Diff line number Diff line change @@ -403,7 +403,7 @@ $(document).ready(function() {
403
403
return ( {
404
404
getPreference ( key , defaultValue ) {
405
405
const res = localStorage . getItem ( `${ namespace } .${ key } ` ) ;
406
- return ! res ? defaultValue : res ;
406
+ return res === null ? defaultValue : res ;
407
407
} ,
408
408
setPreference ( key , value , onChange ) {
409
409
const old = this . getPreference ( key , null ) ;
@@ -415,6 +415,14 @@ $(document).ready(function() {
415
415
} ) ;
416
416
} ;
417
417
418
+ /** Links all tabs created in Liquid templates with class ".tabs-scala-version"
419
+ * on the page together, such that
420
+ * changing a tab to `Scala 2` will activate all other tab sections to
421
+ * also change to "Scala 2".
422
+ * Also records a preference for the Scala version in localStorage, so
423
+ * that when the page is refreshed, the same tab will be selected.
424
+ * On page load, selects the tab corresponding to stored Scala version.
425
+ */
418
426
function setupScalaVersionTabs ( scalaVersionTabs ) {
419
427
const BookStorage = Storage ( 'org.scala-lang.docs.scala3.book' ) ;
420
428
const Scala3 = 'scala-3' ;
You can’t perform that action at this time.
0 commit comments