Skip to content

Commit

Permalink
GH-49: dasht-server: escape C++ docset as ^C\+\+$'
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaku committed May 6, 2020
1 parent 173e0c9 commit 95a02b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/dasht-server-http
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ cat <<HEADER
<select name="docsets">
<option value="" selected>matched $1 out of $3</option>
$(echo "$docsets_menu" | awk -v were_any_ignored=$2 '{
value = "^" $2 "$"
label = were_any_ignored && $1 ? "((( " $2 " )))" : $2
regex = $2; gsub("[[:punct:]]", "\\\\&", regex)
value = "^" regex "$"
print "<option value=\"" value "\">" label "</option>"
}')
</select>
Expand Down

0 comments on commit 95a02b7

Please sign in to comment.