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

请问怎么自定义规则防止博客md文件yaml区被修改呢? #228

Open
hzp2333 opened this issue May 23, 2024 · 1 comment
Open

Comments

@hzp2333
Copy link

hzp2333 commented May 23, 2024

感谢开发!在写数学英文中文夹杂的笔记时非常有帮助!
个人用的hugo博客,yaml区为

+++
title = ' 标题名'
slug = '链接名'
date = 2024-10-29T18:52:19+08:00
draft = true
math= false
outdatedInfoWarning  = false
lightgallery = true
featuredImage="/img/220px-Cthulhu3.jpg"
tags = ["标签","ass" ]
Categories= ["Movies","test"]
summary=' 总结'
+++

会被默认改为

+++
Title = ' 标题名'
Slug = '链接名'
date = 2024-10-29 T18:52:19+08:00
Draft = true
Math= false
OutdatedInfoWarning  = false
Lightgallery = true
FeaturedImage="/img/220 px-Cthulhu 3. Jpg"
Tags = ["标签","ass" ]
Categories= ["Movies","test"]
Summary=' 总结'
+++

请问应当怎么修改防止这部分被干扰呢

@hzp2333 hzp2333 changed the title q请问怎么自定义规则防止博客md文件yaml区被修改呢? 请问怎么自定义规则防止博客md文件yaml区被修改呢? May 23, 2024
@Yaozhuwa
Copy link
Owner

Yaozhuwa commented Jun 4, 2024

插件目前只解析Obsidian默认的语法,对于Obsidian的yaml区是不会自动格式化的,但是对于你这种别的类型的yaml区,没有做特殊处理所以不识别。

你这里的问题是两个:

  1. 时间格式被错误添加空格了,这个在最新版本中应该没有这个问题。或者是自定义正则设置里面添加了某些规则
  2. 图片路径链接被错误格式化了,这个可以通过本插件的自定义正则表达式来方式对路径链接进行格式化

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

No branches or pull requests

2 participants