[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ellama b60641fa24 1/3: Fix some bad markdown to org tra
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ellama b60641fa24 1/3: Fix some bad markdown to org translations |
Date: |
Sat, 24 Feb 2024 06:58:03 -0500 (EST) |
branch: externals/ellama
commit b60641fa24bae111505139259870904e1198f700
Author: Sergey Kostyaev <sskostyaev@gmail.com>
Commit: Sergey Kostyaev <sskostyaev@gmail.com>
Fix some bad markdown to org translations
---
ellama.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ellama.el b/ellama.el
index 1664e13603..cb85e676a4 100644
--- a/ellama.el
+++ b/ellama.el
@@ -369,9 +369,9 @@ Too low value can break generated code by splitting long
comment lines."
This filter contains only subset of markdown syntax to be good enough."
(->> text
;; code blocks
- (replace-regexp-in-string "^```\\(.+\\)$" "#+BEGIN_SRC \\1")
+ (replace-regexp-in-string "^[[:space:]]*```\\(.+\\)$" "#+BEGIN_SRC \\1")
(replace-regexp-in-string "^<!-- language: \\(.+\\) -->\n```"
"#+BEGIN_SRC \\1")
- (replace-regexp-in-string "^```$" "#+END_SRC")
+ (replace-regexp-in-string "^[[:space:]]*```$" "#+END_SRC")
;; lists
(replace-regexp-in-string "^\\* " "+ ")
;; bold
@@ -379,7 +379,7 @@ This filter contains only subset of markdown syntax to be
good enough."
(replace-regexp-in-string "__\\(.+?\\)__" "*\\1*")
(replace-regexp-in-string "<b>\\(.+?\\)</b>" "*\\1*")
;; italic
- (replace-regexp-in-string "_\\(.+?\\)_" "/\\1/")
+ ;; (replace-regexp-in-string "_\\(.+?\\)_" "/\\1/") ;; most of the time
it breaks code blocks, so disable it
(replace-regexp-in-string "<i>\\(.+?\\)</i>" "/\\1/")
;; inline code
(replace-regexp-in-string "`\\(.+?\\)`" "~\\1~")