diff --git a/src/js/wordManagement.js b/src/js/wordManagement.js
index e037beb..fe95e2c 100644
--- a/src/js/wordManagement.js
+++ b/src/js/wordManagement.js
@@ -90,7 +90,7 @@ export function parseReferences(detailsMarkdown) {
if (homonymn < 1 && homonymnIndexes.length > 0) {
homonymn = 1;
}
- const homonymnSubHTML = homonymn > 0 ? '' + homonymn.toString() + '' : '';
+ const homonymnSubHTML = homonymnIndexes.length > 1 && homonymn - 1 >= 0 ? '' + homonymn.toString() + '' : '';
const wordMarkdownLink = `[${translateOrthography(wordToFind)}${homonymnSubHTML}](#${existingWordId})`;
detailsMarkdown = detailsMarkdown.replace(new RegExp(reference, 'g'), wordMarkdownLink);
}
diff --git a/src/php/api/Dictionary.php b/src/php/api/Dictionary.php
index 21fb3d4..fc7412a 100644
--- a/src/php/api/Dictionary.php
+++ b/src/php/api/Dictionary.php
@@ -217,7 +217,7 @@ VALUES ($new_id, ?, ?, ?, ?, ?)";
if ($homonymn < 1) {
$homonymn = 1;
}
- $homonymn_sub_html = $homonymn > 0 ? '' . $homonymn . '' : '';
+ $homonymn_sub_html = count($reference_ids) > 1 && $homonymn - 1 >= 0 ? '' . $homonymn . '' : '';
$site_root = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], $dictionary_id));
$markdown_link = ''
. '' . $this->translateOrthography($word_to_find, $dictionary_id) . '' . $homonymn_sub_html