Skip to content

Commit 67e7b7d

Browse files
committed
analyzes ota text snippets for possible language differences
1 parent 5c82f26 commit 67e7b7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/models/document.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ def fetch_ota_text
5252

5353
document_html = Kramdown::Document.new(document_markdown).to_html
5454

55-
# compare text for **possible** language differences
56-
# old_text_snippets = retrieve_snippets(document_html)
55+
# compare text for **possible** language (i.e., English, German, etc.) differences
56+
new_text_snippets = retrieve_snippets(document_html)
57+
new_text_snippets = new_text_snippets[:snippets]
58+
no_matches = new_text_snippets.length == 1 && !new_text_snippets[0][:pointId]
59+
return if no_matches
60+
5761
self.text = document_html
5862
self.ota_sourced = true
5963
self.url = document_ota_url

0 commit comments

Comments
 (0)