Skip to content

Commit

Permalink
🐛 #661 第一点和第二点
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jul 31, 2020
1 parent f6dd799 commit bc03a2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ts/sv/inputEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ export const inputEvent = (vditor: IVditor, event?: InputEvent) => {
html = blockElement.previousElementSibling.textContent + html;
blockElement.previousElementSibling.remove();
}
if (blockElement.previousElementSibling && html.indexOf("---\n") === 0) {
// 确认 yaml-front 是否为首行
html = blockElement.previousElementSibling.textContent + html;
blockElement.previousElementSibling.remove();
}
// 添加链接引用
const allLinkRefDefsElement = vditor.sv.element.querySelector("[data-type='link-ref-defs-block']");
if (allLinkRefDefsElement && !blockElement.isEqualNode(allLinkRefDefsElement.parentElement)) {
Expand Down

0 comments on commit bc03a2a

Please sign in to comment.