Skip to content

Commit 06354a3

Browse files
committed
updated comments
1 parent 3875fd3 commit 06354a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/jekyll-theme-cs50.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,13 @@ def describe(input, max_length = 160)
110110
# Parse HTML and extract text
111111
doc = Nokogiri::HTML5.fragment(html)
112112

113-
# Remove the page's title (first h1 tag)
113+
# Remove the page's title (i.e., first h1 tag)
114114
doc.css("h1").first&.remove
115115

116-
# Remove table of contents (first ul with id of markdown-toc)
116+
# Remove any table of contents
117117
doc.css("ul#markdown-toc").first&.remove
118118

119+
# Strip tags
119120
text = doc.text.strip
120121

121122
# Clean up whitespace

0 commit comments

Comments
 (0)