branch: elpa/gptel
commit e1050ef6e5ecbbe31bc35abfa293a5dee75e9647
Author: Karthik Chikmagalur <karthikchikmaga...@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmaga...@gmail.com>

    gptel-org: Fix org-conversion around punctuation (#813)
    
    * gptel-org.el (gptel--stream-convert-markdown->org): Fix handling
    of markdown asterisks next to punctuation.  Text of the form
    
     *Some:* and *:more*
    
    should still be parsed as emphasis regions.
---
 gptel-org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gptel-org.el b/gptel-org.el
index 67add2a782..bf5aed57e6 100644
--- a/gptel-org.el
+++ b/gptel-org.el
@@ -713,9 +713,9 @@ cleaning up after."
                        (cond      ; At bob, underscore/asterisk followed by 
word
                         ((or (and (bobp) (looking-at 
"\\(?:_\\|\\*\\)\\([^[:space:][:punct:]]\\|$\\)"))
                              (looking-at ; word followed by underscore/asterisk
-                              
"[^[:space:][:punct:]\n]\\(?:_\\|\\*\\)\\(?:[[:space:][:punct:]]\\|$\\)")
+                              
"[^[:space:]\n]\\(?:_\\|\\*\\)\\(?:[[:space:]]\\|$\\)")
                              (looking-at ; underscore/asterisk followed by word
-                              
"\\(?:[[:space:][:punct:]]\\)\\(?:_\\|\\*\\)\\([^[:space:][:punct:]]\\|$\\)"))
+                              
"\\(?:[[:space:]]\\)\\(?:_\\|\\*\\)\\([^[:space:]]\\|$\\)"))
                          ;; Emphasis, replace with slashes
                          (forward-char (if (bobp) 1 2)) (delete-char -1) 
(insert "/"))
                         ((or (and (bobp) (looking-at "\\*[[:space:]]"))

Reply via email to