summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/index.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.sh b/src/index.sh
index 345c9b3..93ee727 100755
--- a/src/index.sh
+++ b/src/index.sh
@@ -23,7 +23,7 @@ insert() {
insert_term() {
LINK="$1"
- NAME="$(echo "$LINK" | pup -p 'a text{}' | sed 's/"/\"\"/g')"
+ NAME="$(echo "$LINK" | pup -p 'a text{}' | sed 's/"/\"\"/g' | tr -d \\n)"
TYPE="Entry"
PAGE_PATH="$(echo "$LINK" | pup -p 'a attr{href}')"
@@ -34,7 +34,7 @@ insert_term() {
insert_index_terms() {
# Get each term from an index page and insert
while [ -n "$1" ]; do
- grep -Eo "<a href.*></a>" "$1" | while read -r line; do
+ grep -Eo "<a href.*></a>:" "$1" | while read -r line; do
insert_term "$line"
done