emacs-china / EGO

EGO is a static site generator that depends on Emacs, Git and Org-mode.
94 stars 11 forks source link

fix #83 by replace '?' and '#' to '-' #84

Closed Liu233w closed 8 years ago

Liu233w commented 8 years ago

now you don't have to add #+URI to your org file if your title contain these character which can't be in a legal url.

kuangdash commented 8 years ago

之前不这么做主要是觉得这样可能会掩盖些什么……

这里可以把第一个 replace-regexp-in-string 改成 (replace-regexp-in-string "[ :/\\\\?\\#]+" "-" string),这样就不需要用第两个 replace-regexp-in-string 了。

这点改完后我会来合并这个 pull request。

Liu233w commented 8 years ago

是不是因为如果有两个标题是这样的页面会冲突: 123? 123-

我觉得可以把标题本身作为种子来生成一个伪随机数,然后用这个随机数来替换#?,这样冲突的概率就小很多了,而且标题的改变也可以直接反映到URL上。

kuangdash commented 8 years ago

没事前面还有日期……时间是不会冲突的……谁也无法两次踏入同一条河流

Liu233w commented 8 years ago

如果是同一天发的就冲突了啊(:зゝ∠)