From 9e66c58cebfd219a3a777944194cef292fcc5aad Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 2 Aug 2016 18:37:31 +0100 Subject: [PATCH] Spelling. --- synapse/rest/media/v1/preview_url_resource.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py index 4624b8901..e1212313e 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -373,7 +373,7 @@ class PreviewUrlResource(Resource): new_desc = "" # This splits the paragraph into words, but keeping the - # (proceeding) whitespace intact so we can easily concat + # (preceeding) whitespace intact so we can easily concat # words back together. for match in re.finditer("\s*\S+", description): word = match.group() @@ -383,7 +383,7 @@ class PreviewUrlResource(Resource): if len(word) + len(new_desc) < MAX_SIZE: new_desc += word else: - # At thi point the next word *will* take us over + # At this point the next word *will* take us over # MAX_SIZE, but we also want to ensure that its not # a huge word. If it is add it anyway and we'll # truncate later. @@ -396,7 +396,7 @@ class PreviewUrlResource(Resource): new_desc = new_desc[:MAX_SIZE] # We always add an ellipsis because at the very least - # we chooped mid paragraph. + # we chopped mid paragraph. description = new_desc.strip() + "…" og['og:description'] = description if description else None