Skip to content

Commit

Permalink
web: Fix diagnostic length.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Sep 14, 2023
1 parent 977cb8f commit d049c58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions autocorrect-website/src/AppEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ export const autocorrectLib = import('@huacnlee/autocorrect');

export let config = {
rules: {
fullwidth: 2,
'halfwidth-punctuation': 2,
spellcheck: 2,
},
spellcheck: {
Expand All @@ -27,7 +25,7 @@ export const createMarkers = (result: any) => {
startLineNumber: lineResult.l,
startColumn: lineResult.c,
endLineNumber: lineResult.l,
endColumn: lineResult.c + lineResult.old.length + 1,
endColumn: lineResult.c + lineResult.old.length,
message: `AutoCorrect: ${lineResult.new}`,
};
}
Expand Down
9 changes: 5 additions & 4 deletions autocorrect-website/src/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ export default {
markdown: {
title: 'Markdown',
raw: `# 这是Heading 1大标题
**加粗**
*倾斜*
~~删除线~~
这是**Bold加粗**在1个段落中,这端会correct掉,如果是inline code,例如\`Rust语言\`,也可以应该处理。
这是**Bold加粗**在1个段落中,这端会correct掉,如果是inline code,例如\`Rust语言\`,也可以应该处理.
> 引用文本:Quote也是可以的。
\`\`\`rust
// Codeblock里面也会处理
let a = "你好hello";
\`\`\`
- ![img图片](https://google.com/a/b/url不处理)
- [link链接](https://google.com/a/b/url不处理)`,
},
Expand Down

0 comments on commit d049c58

Please sign in to comment.