From a2d526c4b12ffa1cece78be7e6bfedf0b2b60576 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Sat, 24 Jan 2015 01:01:37 -0200 Subject: Less demanding final regexp for questions. --- sx.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sx.el') diff --git a/sx.el b/sx.el index e0609a7..26151b3 100644 --- a/sx.el +++ b/sx.el @@ -148,12 +148,7 @@ with a `link' property)." ;; From URL (string-match (rx "/questions/" ;; Question ID - (group-n 1 (+ digit)) "/" - ;; Optional question title - (optional (+ (not (any "/"))) "/") - ;; Garbage at the end - (optional (and (any "?#") (* any))) - string-end) + (group-n 1 (+ digit)) "/") link)) (push '(type . question) result))) (push (cons 'id (string-to-number (match-string-no-properties 1 link))) -- cgit v1.2.3 From ba4489691847ed1cff2f33f1bfa9aeda85af2a6b Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 3 Feb 2015 13:17:59 -0200 Subject: New function sx--squash-whitespace --- sx.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sx.el') diff --git a/sx.el b/sx.el index 26151b3..14af94d 100644 --- a/sx.el +++ b/sx.el @@ -331,6 +331,10 @@ GET-FUNC and performs the actual comparison." (funcall ,get-func a) (funcall ,get-func b)))) +(defun sx--squash-whitespace (string) + "Return STRING with consecutive whitespace squashed together." + (replace-regexp-in-string "[ \r\n]+" " " string)) + ;;; Printing request data (defvar sx--overlays nil -- cgit v1.2.3 From 208c91548a100d6a214b2161351d0a04d60adb8d Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Sat, 7 Feb 2015 23:54:58 -0200 Subject: Version bump --- sx.el | 4 ++-- sx.org | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sx.el') diff --git a/sx.el b/sx.el index 14af94d..33b36b6 100644 --- a/sx.el +++ b/sx.el @@ -4,7 +4,7 @@ ;; Author: Sean Allred ;; URL: https://github.com/vermiculus/sx.el/ -;; Version: 0.1 +;; Version: 0.2 ;; Keywords: help, hypermedia, tools ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5") (json "1.3") (markdown-mode "2.0") (let-alist "1.0.3")) @@ -28,7 +28,7 @@ ;;; Code: (require 'tabulated-list) -(defconst sx-version "0.1" "Version of the `sx' package.") +(defconst sx-version "0.2" "Version of the `sx' package.") (defgroup sx nil "Customization group for the `sx' package." diff --git a/sx.org b/sx.org index e206cc2..014b0de 100644 --- a/sx.org +++ b/sx.org @@ -1,4 +1,4 @@ -#+MACRO: version 0.1 +#+MACRO: version 0.2 #+MACRO: versiondate 16 November 2014 #+MACRO: updated last updated {{{versiondate}}} -- cgit v1.2.3