gptel: Improve Org stream conversion
* gptel.el (gptel--convert-markdown->org, gptel--stream-convert-markdown->org): Don't touch underscores in the source markdown. This will turn some emphasis blocks into underlines in Org, but we can live with that. Fix #40.
This commit is contained in:
parent
c41a53f526
commit
10f57605ce
1 changed files with 2 additions and 2 deletions
4
gptel.el
4
gptel.el
|
@ -1212,7 +1212,7 @@ elements."
|
||||||
((looking-back "\\(?:[[:word:]]\\|\s\\)\\*\\{2\\}"
|
((looking-back "\\(?:[[:word:]]\\|\s\\)\\*\\{2\\}"
|
||||||
(max (- (point) 3) (point-min)))
|
(max (- (point) 3) (point-min)))
|
||||||
(backward-delete-char 1))))
|
(backward-delete-char 1))))
|
||||||
((or "_" "*")
|
("*"
|
||||||
(if (save-match-data
|
(if (save-match-data
|
||||||
(and (looking-back "\\(?:[[:space:]]\\|\s\\)\\(?:_\\|\\*\\)"
|
(and (looking-back "\\(?:[[:space:]]\\|\s\\)\\(?:_\\|\\*\\)"
|
||||||
(max (- (point) 2) (point-min)))
|
(max (- (point) 2) (point-min)))
|
||||||
|
@ -1277,7 +1277,7 @@ text stream."
|
||||||
((looking-back "\\(?:[[:word:]]\\|\s\\)\\*\\{2\\}"
|
((looking-back "\\(?:[[:word:]]\\|\s\\)\\*\\{2\\}"
|
||||||
(max (- (point) 3) (point-min)))
|
(max (- (point) 3) (point-min)))
|
||||||
(backward-delete-char 1))))
|
(backward-delete-char 1))))
|
||||||
((and (or "_" "*") (guard (not in-src-block)))
|
((and "*" (guard (not in-src-block)))
|
||||||
(when (save-match-data
|
(when (save-match-data
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(backward-char 2)
|
(backward-char 2)
|
||||||
|
|
Loading…
Add table
Reference in a new issue