From b6f4591fdcf4bbf47a059abd64b6ffb30ba5a6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Sun, 8 Dec 2024 00:07:41 +0100 Subject: [PATCH] Revert "Code formatting" This reverts commit 96e588de0a8b559292c9bc3a6387f49e7b72d3b3. --- src/blog.coffee | 2 +- src/comment.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blog.coffee b/src/blog.coffee index ff455bb..1dbf496 100644 --- a/src/blog.coffee +++ b/src/blog.coffee @@ -16,7 +16,7 @@ export class Blog # Creates a new blog from the specified JSON object. @fromJson: (json) -> new @ charset: if typeof json.blog_charset is "string" then json.blog_charset else "" - languages: if typeof json.blog_lang is "string" then json.blog_lang.split(",").map ($) -> $.trim() else [] + languages: if typeof json.blog_lang is "string" then json.blog_lang.split(",").map (language) -> language.trim() else [] url: if typeof json.blog is "string" then json.blog else "" # Returns a JSON representation of this object. diff --git a/src/comment.coffee b/src/comment.coffee index c3ad016..a4e2d9a 100644 --- a/src/comment.coffee +++ b/src/comment.coffee @@ -35,7 +35,7 @@ export class Comment # Creates a new comment from the specified JSON object. @fromJson: (json) -> - hasAuthor = Object.keys(json).filter(($) -> $.startsWith("comment_author") or $.startsWith("user")).length > 0 + hasAuthor = Object.keys(json).filter((key) -> key.startsWith("comment_author") or key.startsWith("user")).length > 0 new @ author: if hasAuthor then Author.fromJson json else null content: if typeof json.comment_content is "string" then json.comment_content else ""