forked from scala/docs.scala-lang
-
Notifications
You must be signed in to change notification settings - Fork 4
Scala3 Documentation #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
170 commits
Select commit
Hold shift + click to select a range
c6b25b5
Added empty initial files.
alvinj b39b7a4
This is an early draft to demonstrate my writing style.
alvinj 4af19bb
This is an early draft to demonstrate my writing style.
alvinj 61e26ed
Added more topics while reducing the descriptive text.
alvinj 8a1d644
Worked on the first half of Jonathan's comments.
alvinj e4f2390
Update _overviews/overview/a-taste-of-scala.md
alvinj 97e96f8
Update _overviews/overview/a-taste-of-scala.md
alvinj 006dac9
Update _overviews/overview/a-taste-of-scala.md
alvinj e2b11c0
Update _overviews/overview/a-taste-of-scala.md
alvinj 5cd4189
Update _overviews/overview/a-taste-of-scala.md
alvinj dd13390
Update _overviews/overview/a-taste-of-scala.md
alvinj 1b6f549
Update _overviews/overview/a-taste-of-scala.md
alvinj 842f785
Update _overviews/overview/a-taste-of-scala.md
alvinj b1c49b8
Merge pull request #1 from scalacenter/overview
alvinj 13653e5
New versions of the Taste of Scala, Introduction, and Control Structu…
alvinj d288738
Added the initial version of the Scala Features document
alvinj 8995017
Initial version of the ‘Interacting With Java’ document.
alvinj d53ad0e
Initial version of the ‘First Look at Types’ document.
alvinj 8dc7054
Moved some of the Types content to the ‘First Look at Types’ document.
alvinj ab04eec
Initial version of the ‘Collections Classes and Methods’ document.
alvinj 4e04959
Initial version of the ‘Scala for Java Developers’ document.
alvinj f0940ac
Initial versions of the ‘Methods’ and ‘Scala for Python Developers’ d…
alvinj eedcf95
Corrected miscellaneous spelling and syntax errors.
alvinj ae6cbbd
Adding four new Overview chapters.
alvinj 26eb096
Initial versions of the ‘Main Methods’ and ‘Higher-Order Functions’ d…
alvinj 9ac0fb7
Initial version of the ‘Packaging and Imports’ document.
alvinj 8f3c91e
Renamed the ‘Packaging and Imports’ document.
alvinj a65106b
Didn’t make this shorter, but improved some areas.
alvinj f75875d
Initial version of the ‘Functional Programming’ document.
alvinj 607dfd4
Add option to present page as Scala 3 docs
b-studios 98baa72
Start to reorganize contents for inclusion of Scala 3 docs
b-studios ffc7482
Move language switch all the way to the top
b-studios 07e8f60
Factor into smaller includes
b-studios b537746
Add new language page offering selection between scala2 and 3
b-studios 76d33d1
Fix language marker in navigation
b-studios 0a6e771
Port macro documentation
b-studios f95397d
Add stub pages for guides and getting started
b-studios cf3210b
Update links in navbar
b-studios 0b5f8eb
Hide language specifier on small screens
b-studios 05243e6
Add guides overview for Scala 3
b-studios e07c7aa
For now put Scala 2 first
b-studios c926bd8
Added the 'Modeling' chapters, updated the 'Scala for Java/Python' ch…
alvinj aac6dae
Change permalink structure
b-studios b2cc305
Add 'Preview' as suggested by Martin
b-studios b465ac9
Added the 'Contextual Abstractions' chapter as a series of sections.
alvinj 83dba90
Forgot to remove this file.
alvinj 5d968dd
Add scala3 as a default
b-studios e3dfabf
Add contribution to docs overview
b-studios ff0a16c
Adding the 'Types' chapter as a series of sections.
alvinj c81b267
Two new chapters, and two new Types sections.
alvinj 7ca03ed
Don’t need numbers on the filenames any more.
alvinj d30cc94
Added num, previous-page and next-page to the Front Matter of all pages.
alvinj 0f1e366
Added the Getting Started docs.
alvinj 5485ae4
Make it clear that Scala 3 is not yet released
b-studios 4f33dfb
Merge branch 'overview-docs' into scala3-unification
b-studios 288c312
Move getting started guide
b-studios f5265f1
Revise getting started
b-studios 7e6d788
Update compatible versions
b-studios be146ef
Use comment syntax
b-studios a1c6bf3
move book to scala3-book
b-studios 86479e7
Delete different OS dependent instructions for now
b-studios 0c46b26
Add a link to the reference
b-studios 2120282
Change default to section to only mark chapters
b-studios a483b1d
Update links in first 4 sections
b-studios 0308998
Updated the JavaScript content and the CSS.
alvinj d03fa63
Changed 'Overview' references to 'book'. Added a few links.
alvinj 03ae684
Updated page hierarchy and some titles
alvinj 61a2760
Starting to integrate comments
alvinj 5a50882
Working through Jonathan’s comments and related issues
alvinj b88401f
Do not list h4 in TOC
b-studios b4e24f4
Make toc part of the section li and fix line-height
b-studios 0636cbf
Disable sliding TOC in the Scala 3 part of the website
b-studios ce47f5f
Organized the Methods and Functions chapters
alvinj ca970d3
Quick review of the Methods and Functions chapters
alvinj d829a6f
Split the Collections chapter into sections
alvinj f53fe84
Separated the 'Taste of Scala' doc into sections
alvinj 1c2155e
Domain Modeling is more accurate than Data Modeling
alvinj bdf6d0d
Broke the FP chapter into sections
alvinj 0d7e5ae
A few updates in response to Jonathan’s initial comments
alvinj 60a9b6c
More work on Jonathan’s initial comments
alvinj e608282
Rephrase intro
b-studios 4e67a51
Add draft of new-in-scala3
b-studios b7a62d5
Streamline main page to put less focus on Scala 3
b-studios 88111d8
Expand on meta programming
b-studios 0027683
Updated the Scala Tools section, including the 'scala-3-version' setting
alvinj fb66cf1
Added Toplevel Definitions, made 'Taste of Scala' intro consistent wi…
alvinj 8dc3235
Working through more of Jonathan’s initial comments
alvinj 81c637a
Use globally configured scala 3 versions
b-studios 32360db
Update scala3/index.md
b-studios 43ea987
Update scala3/new-in-scala3.md
b-studios 9ba323a
Remove getting started for now to ease review
b-studios 8232993
Update scala3 macros to be on par with scala3-macro-tutorial
b-studios 308ed17
Revise new-in-scala and add OO section
b-studios 0639958
Add new in Scala 3 to the navigation bar
b-studios 2b3d669
Fix icon headers on landing page
b-studios 3c9ce36
Apply suggestions from code review
b-studios 2e7befa
Apply suggestions from code review
b-studios 6ebc157
Only whitespace fixes
b-studios c580703
Incorporate @sjrd's suggestions for the scala-for-js-devs section
b-studios a4a9ba6
Fix links in the contextual abstractions chapter
b-studios fbb2f50
Update given syntax as pointed out by @bishabosha
b-studios c810c68
Two more given syntax updates
b-studios 7490ba9
Apply suggestions from code review by @vincenzobaz
b-studios 928cf03
Apply suggestions from code review by @adpi2
b-studios 03f2652
Apply suggestions from code review by @WojciechMazur
b-studios 99255a6
Apply suggestions from code review by @tgodzik
b-studios 53a7e7d
Apply suggestions from code review @bishabosha
b-studios cbe5d4d
Made the Getting Started page more concise
alvinj 2528b49
Sketch Scala 3 hierarchy with Matchable
b-studios 2dd22d3
Revise first-look-at-types
b-studios 6e17bf0
Revise control-structures
b-studios f77c931
Revise modeling intro and tools
b-studios a0f7cdd
Add missing code fences
b-studios c2b7aec
Revise methods sections
b-studios bc00b1d
Streamline presentation of files a bit
b-studios ffbd2c1
Use import suggestions paragraph from @julienrf
b-studios b5cc84e
Revise oo design
b-studios 3ab41f9
Mostly responded to comments by @tgodzik
alvinj 2fecc4a
Resolved my own TODO items, or made them Jekyll comments
alvinj 4b26c1f
Resolved most comments from @vincenzobaz and @b-studios
alvinj e95ed18
Replaced 'class' with 'type', per @vincenzobaz comments in other sect…
alvinj 1fb1faa
Reviewed the OOP page
alvinj 3a2e890
Revise FP modeling
b-studios a02c100
Revise type section up to Union types
b-studios 3c831d6
Revise enum section
b-studios f46157f
Revise type class section
b-studios 93f9c10
Fixing minor typos
b-studios 76e8465
Revise variance section
b-studios c1caf6c
Drop those from the list since we do cover them (at least briefly)
b-studios 74a45c8
Revise opaque types
b-studios 7926c00
Add a quick example why we say 'leaky'
b-studios 607410f
Updates for @vinz’s comments
alvinj ac0f935
Delete all HTML comments before going live
alvinj 63533a2
Removed the Metaprogramming chapter and renumbered the files
alvinj b67dcaa
Responded to @vincenzobaz’s comments
alvinj 42047b6
Responded to @sjrd’s comments
alvinj f0531f6
Seems like a good place to reference the Migration Guide
alvinj 5a29693
Responding to more comments
alvinj 3c56556
Reviewed the 'types' pages
alvinj ce4967b
Drop the links to Scala 2 and Scala 3 pages and integrate on landing …
b-studios 87dde8a
Add a clearly visible disclaimer on every page
b-studios 693cf3d
Slightly revise the getting started page
b-studios 7a5a4f4
Remove text underline from docs link in the nav bar
b-studios 5a01937
Fix multiple highlighted headlines in TOC
b-studios f0cdee4
Revise dependent function types
b-studios ac860f9
Revise contextual abstractions
b-studios 75a3507
Minor fixes
b-studios 042546e
Updates per @vincenzobaz’s comments
alvinj 18edb35
Moved Type Classes to just after Givens
alvinj a077f63
Use current milestone
b-studios dceb41b
Update macros
b-studios 8159550
All paragraphs are now separate lines to simplify PRs
alvinj f2c57cb
Added line breaks for easier comments and PRs
alvinj 064782e
Use a consistent style on all blockquotes
alvinj 371ae2c
Resolved ‘See the Reference docs’ lines that had nothing to link to
alvinj f378c0f
Fixed broken links
alvinj ec7077f
Reduced ‘Summary’ titles after recent ToC fix
alvinj a9a0ac3
Removed side-by-side tables
alvinj 8cced66
First attempt at improving code block readability
alvinj ad3082e
Got the desired look using only CSS
alvinj f111c93
Updated the JavaScript page, put the CSS in one file
alvinj f6a545b
Updated the Python page, and the CSS
alvinj 6b470ff
Working to resolve the Pure Function definition
alvinj d9cff8d
Fix link in navigation
b-studios be74175
Fix some links in macros tutorial
b-studios 854b37d
Fix some more links
b-studios 707ed21
Comment it out, if it is outdated
b-studios 4c52788
Fix a few more broken links
b-studios 5769941
Fix remaining broken links
b-studios 1c02731
Change link of migration status
b-studios File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- title: Learn | ||
url: "#" | ||
submenu: | ||
- title: New in Scala 3 | ||
url: "/scala3/new-in-scala3.html" | ||
- title: Getting Started | ||
url: "/scala3/getting-started.html" | ||
- title: Scala 3 Book | ||
url: "/scala3/book/introduction.html" | ||
- title: Macro Tutorial | ||
url: "/scala3/guides/macros/index.html" | ||
- title: Migrate | ||
url: "https://scalacenter.github.io/scala-3-migration-guide" | ||
- title: Reference | ||
url: "https://dotty.epfl.ch/docs/reference/overview.html" | ||
- title: API | ||
url: "https://dotty.epfl.ch/api/index.html" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<div class="documentation"> | ||
{% for section in include.sections %} | ||
<div class="section"> | ||
<h2 class="frontpage">{{ section.title }}</h2> | ||
{% for link in section.links %} | ||
<a href="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}" class="doc-item"> | ||
<div class="doc-item-header"> | ||
<i class="{{link.icon}}"></i> | ||
<h5>{{link.title}}</h5> | ||
</div> | ||
<div class="doc-item-main"> | ||
<p>{{link.description}}</p> | ||
</div> | ||
</a> | ||
{% endfor %} | ||
</div> | ||
<div class="more-resources"> | ||
{% if section.more-resources %} | ||
<span class="heading">{{ page.more-resources-label }}: </span> | ||
<ul> | ||
{% for resource in section.more-resources %} | ||
<li><a href="{{ site.baseurl }}{{ resource.url }}">{{ resource.title }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</div> | ||
{% endfor %} | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
<header id="site-header"> | ||
<div class="wrap"> | ||
<nav class="navigation" role="menu"> | ||
<a href="http://scala-lang.org" class="navigation-bdand"> | ||
<img src="{{ site.baseurl }}/resources/img/frontpage/[email protected]" alt=""> | ||
</a> | ||
<div class="navigation-panel-button"> | ||
<i class="fa fa-bars"></i> | ||
</div> | ||
<ul class="navigation-menu"> | ||
{% for navItem in site.data.nav-header %} | ||
<li class="navigation-menu-item"> | ||
<a href="{% if navItem.url contains '://' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}" {% if page.url contains navItem.url %}class="active"{% endif %}>{{navItem.title}}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
</div> | ||
</header> | ||
{% if page.scala3 %} | ||
{% assign navdata = site.data.scala3-doc-nav-header %} | ||
{% else %} | ||
{% assign navdata = site.data.doc-nav-header %} | ||
{% endif %} | ||
|
||
{% include site-header.html %} | ||
|
||
{% if page.scala3 %} | ||
<header id="doc-header" class="scala3"> | ||
{% else %} | ||
<header id="doc-header"> | ||
{% endif %} | ||
<div class="wrap" style="padding: 0px;"> | ||
<nav class="doc-navigation" role="menu"> | ||
{% assign docsRootTranslated = site[page.language] | where: 'partof', 'documentation' | first %} | ||
<a href="{{ site.baseurl }}/{{ docsRootTranslated.language }}" class="navigation-bdand" > | ||
<img src="{{ site.baseurl }}/resources/img/[email protected]" alt=""> | ||
<div class="navigation-bdand"> | ||
<a href="{{ site.baseurl }}/{{ docsRootTranslated.language }}"> | ||
<img src="{{ site.baseurl }}/resources/img/[email protected]" alt="docs"> | ||
</a> | ||
<span class="doc-language-version"> | ||
— Scala {% if page.scala3 %} 3 {% else %} 2 {% endif %} | ||
</span> | ||
</div> | ||
<div class="navigation-ellipsis"> | ||
<i class="fa fa-ellipsis-v"></i> | ||
</div> | ||
<ul class="navigation-menu"> | ||
{% for navItem in site.data.doc-nav-header %} | ||
{% for navItem in navdata %} | ||
<li class="navigation-menu-item"> | ||
{% capture translatedPageId %}/{{page.language}}{{navItem.url | remove_first: '.html' }}{% endcapture %} | ||
{% assign navItemTranslated = site.documents | where: 'id', translatedPageId | first %} | ||
|
@@ -49,7 +47,7 @@ | |
</ul> | ||
</nav> | ||
<nav class="doc-navigation-submenus"> | ||
{% for navItem in site.data.doc-nav-header %} | ||
{% for navItem in navdata %} | ||
{% if navItem.submenu %} | ||
<ul class="navigation-submenu" id="{{ navItem.title | downcase | strip }}" style="display: none;"> | ||
{% for subItem in navItem.submenu %} | ||
|
@@ -61,7 +59,7 @@ | |
{% endif %} | ||
{% endfor %} | ||
<ul class="navigation-submenu ellipsis-menu" style="display: none;"> | ||
{% for navItem in site.data.doc-nav-header %} | ||
{% for navItem in navdata %} | ||
{% if forloop.index > 3 %} | ||
<li><a href="{% if navItem.url contains '://' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}">{{ navItem.title }}</a></li> | ||
{% endif %} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,25 +11,30 @@ <h5 class="contents">Contents</h5> | |
<ul> | ||
{% assign sorted = site.overviews | sort: 'num' %} | ||
{% for pg in sorted %} | ||
{% if pg.num == page.num %} | ||
{% capture toc %} | ||
<div id="toc"></div> | ||
{% endcapture %} | ||
{% endif %} | ||
|
||
{% if pg.num and (page.partof == pg.partof) %} | ||
{% if page.language %} <!-- if page is a translation, get the translated title --> | ||
{% assign prefix = page.language | prepend: '/' %} | ||
{% assign localizedId = pg.id | prepend: prefix %} | ||
{% for lpg in site.[page.language] %} | ||
{% if lpg.id == localizedId %} | ||
<li><a {% if page.title == lpg.title %}class="active"{% endif %} href="/{{ site.baseurl }}{{ page.language }}{{ pg.url }}">{{ lpg.title }}</a></li> | ||
<li><a {% if page.title == lpg.title %}class="active"{% endif %} href="/{{ site.baseurl }}{{ page.language }}{{ pg.url }}">{{ lpg.title }}</a> | ||
{{ toc }}</li> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we now include the table of contents (or not, if the wrong page). |
||
{% endif %} | ||
{% endfor %} | ||
{% else %} <!-- this must be English, so get the other documents' titles --> | ||
|
||
{% if pg.type %} <!-- if a type is set in a document, we add it as a class. Used in Scala book to diff between chapter and section --> | ||
<li class="type-{{ pg.type }}"><a {% if page.title == pg.title %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ pg.title }}</a></li> | ||
<li class="type-{{ pg.type }}"><a {% if page.num == pg.num %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ pg.title }}</a>{{toc}}</li> | ||
{% else %} | ||
<li><a {% if page.title == pg.title %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ pg.title }}</a></li> | ||
<li><a {% if page.num == pg.num %}class="active"{% endif %} href="{{ site.baseurl }}{{ pg.url }}">{{ pg.title }}</a>{{toc}}</li> | ||
{% endif %} | ||
|
||
{% endif %} | ||
{% if pg.num == page.num %}<div id="toc"></div>{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<header id="site-header"> | ||
<div class="wrap"> | ||
<nav class="navigation" role="menu"> | ||
<a href="http://scala-lang.org" class="navigation-bdand"> | ||
<img src="{{ site.baseurl }}/resources/img/frontpage/[email protected]" alt=""> | ||
</a> | ||
<div class="navigation-panel-button"> | ||
<i class="fa fa-bars"></i> | ||
</div> | ||
<ul class="navigation-menu"> | ||
{% for navItem in site.data.nav-header %} | ||
<li class="navigation-menu-item"> | ||
<a href="{% if navItem.url contains '://' %}{{navItem.url}}{% else %}{{site.baseurl}}{{navItem.url}}{% endif %}" {% if page.url contains navItem.url %}class="active"{% endif %}>{{navItem.title}}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
</div> | ||
</header> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
--- | ||
{% include headertop.html %} {% include headerbottom.html %} | ||
{% if page.new-version %}<a class="new-version-notice" href="{{ page.new-version }}">This page has a new version.</a>{% endif %} | ||
|
||
<div class="navigation-fade-screen"></div> | ||
|
||
{% include site-header.html %} | ||
|
||
<main id="inner-main" class="landing-page"> | ||
|
||
<section class="title-page"> | ||
<div class="wrap"> | ||
<div class="content-title-documentation"> | ||
|
||
<h1>{{page.title}}</h1> | ||
<div class="search-container"> | ||
<div class="icon-search"> | ||
<i class="fa fa-search"></i> | ||
</div> | ||
<input type="text" class="doc-search" id="doc-search-bar" placeholder="Search in doc..."> | ||
<ul class="result-container" id="result-container" style="display: none;"></ul> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section class="table-of-content content-primary"> | ||
<div class="wrap scala2"> | ||
<div class="language-header"> | ||
<h1>Scala 2</h1> | ||
</div> | ||
<div class="inner-box"> | ||
{% include documentation-sections.html sections=page.scala2-sections %} | ||
</div> | ||
</div> | ||
|
||
<div class="wrap scala3"> | ||
<div class="language-header"> | ||
<h1>Scala 3 (Preview)</h1> | ||
</div> | ||
<div class="inner-box"> | ||
<blockquote> | ||
Scala 3 has not been released, yet. We are still in the process of writing the documentation for Scala 3.<br/> | ||
You can <a href="/scala3/contribute-to-docs.html">help us to improve the documentation</a>. | ||
</blockquote> | ||
{% include documentation-sections.html sections=page.scala3-sections %} | ||
</div> | ||
</div> | ||
</section> | ||
|
||
{{content}} | ||
|
||
</main> | ||
|
||
{% include footer.html %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this line do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of achieving proper nesting for the TOC as part of the correct
li
.If we are on the page that has the same number as the one we iterate over, store the tree
<div>...
into the variabletoc
. This is used later (line 27 below) to include the toc as part of theli
.