Skip to content

Automatically replace / in doc titles with  #14134

Closed
@Achuan-2

Description

@Achuan-2

文档标题支持斜杆符号/

In what scenarios do you need this feature?

目前思源笔记的文档标题不支持斜杆
在记录一些专有名词文档,比如”ΔF/F“的时候存在问题
notion、flowus、wolai、logseq等的文档标题全都可以输入/
Image

Image

Image

Image

虽然可以使用全角符号代替,但是很不方便

  • 块引新建文档的时候,原来有斜杆的文字会自动消失,需要手动输入全角符号
  • 文档标题是全角符号的斜杆符号,内容却是正常的斜杆符号,在搜索的时候,也会不方便

Describe the optimal solution

文档标题支持斜杆/

Describe the candidate solution

Other information

Activity

changed the title [-]文档标题支持斜杆/[/-] [+]文档标题支持斜杆/符号[/+] on Feb 18, 2025
changed the title [-]文档标题支持斜杆/符号[/-] [+]文档标题支持斜杆符号/[/+] on Feb 18, 2025
mozhuk

mozhuk commented on Feb 18, 2025

@mozhuk

这些个导出md的时候都要做特殊处理,导致各种附件路径问题。。还是慎重

88250

88250 commented on Feb 18, 2025

@88250
Member

正如楼上所言,这个不考虑改变了,感谢提议。

Achuan-2

Achuan-2 commented on Feb 18, 2025

@Achuan-2
MemberAuthor

如果不打算支持的话,能否让斜杆符号自动替换为全角符号,替换完成后弹窗提示“标题不支持斜杆符号,已自动替换为全角符号”,而不是直接清除
否则选中文字块引新建文档时,得手动再添加

88250

88250 commented on Feb 19, 2025

@88250
Member

这个最好还是不替换了,谢谢

shuojie819

shuojie819 commented on Feb 21, 2025

@shuojie819

希望可以支持一下,很多地方都会用到,而且大部分笔记软件都支持此功能:notion、wolai、flowus、飞书、语雀、logseq、anytype、AFFINE……,而且思源本身就不是使用标题存储的。

88250

88250 commented on Apr 13, 2025

@88250
Member

@zxkmm 提到的方案可能可行,后面评估下看看,谢谢。

reopened this on Apr 13, 2025
self-assigned this
on Apr 13, 2025
88250

88250 commented on Apr 13, 2025

@88250
Member

结合 @Achuan-2 之前提到的方案综合考虑了下,目前的方案:

  • 用户输入 / 时自动替换为全角 ,界面提示“标题不能包含 / 字符,已经自动替换为全角 / 字符”
  • 搜索时还是只能使用全角

4 remaining items

zxkmm

zxkmm commented on Apr 13, 2025

@zxkmm
Contributor

可以的,但是你的这个方案是劣化版的我的方案,因为全角斜杠比unicode PUA里随便抓一个char要常见

88250

88250 commented on Apr 13, 2025

@88250
Member

是的,美观上差一些。不做前端替换的原因是想保持原样,不然搜索、复制等都会有隐患。

emptylight370

emptylight370 commented on Apr 13, 2025

@emptylight370
Contributor
  • 搜索时还是只能使用全角

那在搜索时有没有方案辅助用户输入全角的?还是要用户找个地方复制过来?

zxkmm

zxkmm commented on Apr 13, 2025

@zxkmm
Contributor

仔细想了想好像全角也挺好的,可以不用打空格了。

搜索的问题确实存在可能会搜不到的问题。
复制应该没有隐患,复制literal到别的地方,literal里面是半角斜杠,别的允许的地方不影响,不允许的地方也会自己换。复制文档的话标题只是一个字段,应该不会出现问题。

88250

88250 commented on Apr 13, 2025

@88250
Member
TCOTC

TCOTC commented on Apr 13, 2025

@TCOTC
Contributor

用输入法输入全角吧,也不麻烦

88250

88250 commented on Apr 13, 2025

@88250
Member
modified the milestones: 3.1.28, 3.1.29 on Apr 15, 2025
ruin1990

ruin1990 commented on Apr 27, 2025

@ruin1990
Contributor

设计个通配子串代替斜杆呢?
显示和搜索的时候再转义回斜杆字符,存储的时候用特殊子串,类似emoji的处理。全角可能就行了只是说搜索的时候可能需要优化下

88250

88250 commented on Apr 27, 2025

@88250
Member

设计个通配子串代替斜杆呢? 显示和搜索的时候再转义回斜杆字符,存储的时候用特殊子串,类似emoji的处理。全角可能就行了只是说搜索的时候可能需要优化下

怕有和文件存储中不一致的隐患。

added 2 commits that reference this issue on Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@ruin1990@zxkmm@Achuan-2

      Issue actions

        Automatically replace `/` in doc titles with `/` · Issue #14134 · siyuan-note/siyuan