Revision 7455
Added by Aaron Marcuse-Kubitza almost 12 years ago
redmine_synonyms | ||
---|---|---|
7 | 7 |
sed () { "$(which sed)" -"$sedEreFlag" "$@";} |
8 | 8 |
|
9 | 9 |
ambigTerm= |
10 |
ambigPrefix= |
|
11 | 10 |
term= |
12 | 11 |
sed -n 's/^.*<h([1-4])[^>]*><a href="#[^>]+>([^<]+).*$/\1 \2/p'\ |
13 | 12 |
|while read -r line; do |
... | ... | |
20 | 19 |
term="$name" |
21 | 20 |
|
22 | 21 |
# Handle ambiguous terms |
23 |
termName="${term#\?}" |
|
24 |
if test "$termName" != "$term"; then # ambiguous term (starts with ?) |
|
22 |
if test "${term#\?}" != "$term"; then # ambiguous term (starts with ?) |
|
25 | 23 |
ambigTerm="$term" |
26 |
ambigPrefix="${termName}_" |
|
27 |
elif test -n "$ambigTerm" -a "${term#$ambigPrefix}" != "$term"; then |
|
28 |
# alternative of ambiguous term (starts with $ambigTerm) |
|
24 |
elif test "$level" = 4; then # alternative of ambiguous term |
|
29 | 25 |
echo "$ambigTerm,$term" |
30 | 26 |
else # term not related to ambiguous terms |
31 |
ambigTerm= ambigPrefix= # clear any ambiguous term in effect
|
|
27 |
ambigTerm= # clear any ambiguous term in effect |
|
32 | 28 |
fi |
33 | 29 |
fi |
34 | 30 |
done |
Also available in: Unified diff
redmine_synonyms: Ambiguous terms: Fixed bug where need to use header # instead of term name to determine whether a term is an alternative, because some alternatives (e.g. verbatimElevation) don't follow the units-suffix naming convention.