~edwardloveall/scribe

Fix viewing articles if the URL has a trailing slash v1 PROPOSED

blankie: 1
 Fix viewing articles if the URL has a trailing slash

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~edwardloveall/scribe/patches/36475/mbox | git am -3
Learn more about email & git

[PATCH] Fix viewing articles if the URL has a trailing slash Export this patch

---
Where I saw a URL with a trailing slash in the wild:
https://adamsilver.io/blog/the-disadvantages-of-single-page-applications/#14.-they-just-don%E2%80%99t-feel-right

 src/classes/article_id_parser.cr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/classes/article_id_parser.cr b/src/classes/article_id_parser.cr
index 8693ea6..1db19de 100644
--- a/src/classes/article_id_parser.cr
+++ b/src/classes/article_id_parser.cr
@@ -1,7 +1,7 @@
class ArticleIdParser
  include Monads

  ID_REGEX = /[\/\-]([0-9a-f]+)$/i
  ID_REGEX = /[\/\-]([0-9a-f]+)\/?$/i

  def self.parse(request : HTTP::Request)
    new.parse(request)
-- 
2.38.1
Thank you for finding this and submitting a patch. I merged it as-is and deployed it today. Sorry for such a delay.

Edward