Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: (hooks) 自动超链接-支持展示固定长度字符 #391

Merged
merged 13 commits into from
Feb 14, 2023

Conversation

Morris-G
Copy link
Contributor

@Morris-G Morris-G commented Feb 7, 2023

AutoLink加入截取指定长度字符串展示的功能

config.engine.global新增两个配置项:
/** 是否开启短链接:默认开启 /
enableShortLink: true
/
* 短链接长度:默认20个字符 */
shortLinkLength: 20

修改超链接部分展示样式

jiawei686 and others added 8 commits November 29, 2022 14:25
* dev:
  feat: Tencent#370 增加refreshPreviewer方法,可以强制重新渲染预览区域
  fix: 跨单元格的行内公式、行内代码语法改成不生效
Co-authored-by: sunsonliu <[email protected]>
Co-authored-by: lyngai <[email protected]>
Co-authored-by: humyfred <[email protected]>
Co-authored-by: jiawei686 <[email protected]>
* dev:
  feat: Tencent#379 通过引入第三方组件cm-search-replace实现左侧编辑器搜索、替换功能
  fix: Tencent#380 修复粘贴时转义&的问题,同时修复粘贴table时出现过多换行的问题\n feat: 当表格thead为空的时候,不再渲染<thead>
  fix: Tencent#374 光标处于编辑区域最低部时,预览区域滚动到了顶部
Co-authored-by: sunsonliu <[email protected]>
Co-authored-by: lyngai <[email protected]>
Co-authored-by: humyfred <[email protected]>
Co-authored-by: jiawei686 <[email protected]>
AutoLink加入截取指定长度字符串展示的功能

config.engine.global新增两个配置项:
/** 是否开启短链接:默认开启 */
enableShortLink: true
/** 短链接长度:默认20个字符 */
shortLinkLength: 20

修改超链接部分展示样式
@Morris-G Morris-G marked this pull request as draft February 7, 2023 03:11
@Morris-G Morris-G closed this Feb 7, 2023
@Morris-G Morris-G reopened this Feb 7, 2023
@Morris-G Morris-G marked this pull request as ready for review February 7, 2023 03:14
src/core/hooks/AutoLink.js Outdated Show resolved Hide resolved
src/core/hooks/Link.js Outdated Show resolved Hide resolved
1. 避免匹配`www`导致域名篡改
2. 去除包裹`<a>`的`<span>`
3. AutoLink继承`openNewPage`属性
4. 移除Link中的target篡改
@Morris-G Morris-G requested a review from lyngai February 13, 2023 03:48
src/core/hooks/AutoLink.js Outdated Show resolved Hide resolved
@Morris-G Morris-G requested a review from lyngai February 13, 2023 11:51
@lyngai lyngai changed the base branch from main to dev February 13, 2023 11:52
src/Cherry.config.js Outdated Show resolved Hide resolved
@Morris-G Morris-G requested review from sunsonliu and lyngai and removed request for lyngai and sunsonliu February 13, 2023 12:33
@sunsonliu sunsonliu merged commit 69056e4 into Tencent:dev Feb 14, 2023
jiawei686 added a commit that referenced this pull request Feb 17, 2023
* dev:
  fix: unity header anchor safe id
  fix: #388 修复复制粘贴图片时,图片alt属性丢失的问题
  feat: (hooks) 自动超链接-支持展示固定长度字符 (#391)
  fix: 复制粘贴代码块的时候会丢失\t
  vscode 插件更新到0.0.7
  feat: 增加vscode plugin,可以在vscode扩展中输入cherry-markdown搜索安装该插件
  feat: 丰富图标,优化侧边栏切换主题按钮的下拉框定位
  #382 feat: 增加上传文件的按钮hook
wty92911 pushed a commit to wty92911/cherry-markdown that referenced this pull request May 22, 2023
* feat: (hooks) 自动超链接-支持展示固定长度字符

AutoLink加入截取指定长度字符串展示的功能

config.engine.global新增两个配置项:
/** 是否开启短链接:默认开启 */
enableShortLink: true
/** 短链接长度:默认20个字符 */
shortLinkLength: 20
wty92911 pushed a commit to wty92911/cherry-markdown that referenced this pull request May 22, 2023
* dev:
  fix: unity header anchor safe id
  fix: Tencent#388 修复复制粘贴图片时,图片alt属性丢失的问题
  feat: (hooks) 自动超链接-支持展示固定长度字符 (Tencent#391)
  fix: 复制粘贴代码块的时候会丢失\t
  vscode 插件更新到0.0.7
  feat: 增加vscode plugin,可以在vscode扩展中输入cherry-markdown搜索安装该插件
  feat: 丰富图标,优化侧边栏切换主题按钮的下拉框定位
  Tencent#382 feat: 增加上传文件的按钮hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants