Skip to content

Commit

Permalink
fix typos in cmd/tools/vdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Aug 13, 2023
1 parent 0d436d0 commit 502b935
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cmd/tools/vdoc/html.v
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ fn doc_node_html(dn doc.DocNode, link string, head bool, include_examples bool,
}

fn html_tag_escape(str string) string {
excaped_string := str.replace_each(['<', '&lt;', '>', '&gt;'])
escaped_string := str.replace_each(['<', '&lt;', '>', '&gt;'])
mut re := regex.regex_opt(r'`.+[(&lt;)(&gt;)].+`') or { regex.RE{} }
if re.find_all_str(excaped_string).len > 0 {
if re.find_all_str(escaped_string).len > 0 {
return str
}
return excaped_string
return escaped_string
}

/*
Expand Down
12 changes: 6 additions & 6 deletions cmd/tools/vdoc/theme/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function setupSearchKeymaps() {
ev.preventDefault();
if (!searchResults.length) break;
if (selectedIdx <= 0) {
// Cycle to last if first is selected (or select it if none is selcted yet)
// Cycle to last if first is selected (or select it if none is selected yet)
selectResult(searchResults, searchResults.length - 1);
} else {
// Select previous
Expand All @@ -235,9 +235,9 @@ function createSearchResult(data) {
a.href = data.link;
a.classList.add('link');
li.appendChild(a);
const defintion = document.createElement('div');
defintion.classList.add('definition');
a.appendChild(defintion);
const definition = document.createElement('div');
definition.classList.add('definition');
a.appendChild(definition);
if (data.description) {
const description = document.createElement('div');
description.classList.add('description');
Expand All @@ -247,11 +247,11 @@ function createSearchResult(data) {
const title = document.createElement('span');
title.classList.add('title');
title.textContent = data.title;
defintion.appendChild(title);
definition.appendChild(title);
const badge = document.createElement('badge');
badge.classList.add('badge');
badge.textContent = data.badge;
defintion.appendChild(badge);
definition.appendChild(badge);
return li;
}

Expand Down

0 comments on commit 502b935

Please sign in to comment.