sumnow / markdown-formatter Goto Github PK
View Code? Open in Web Editor NEWmarkdown formatter
markdown formatter
HI!
Thanks for this nice add-on.
Everything is great except this sentence:
in certain situations: Logging in, calling apis, etc ... . For this to work you can
on format turns to this:
in certain situations: Logging in, calling apis, etc .... For this to work you can
But there is a difference. I want that space on my dots.
When I create an unordered list I do it like this
* foo
* bar
* baz
* quux
The formatter converts this to
* foo
+ bar
- baz
+ quux
But this is caught by the markdown linter
MD004/ul-style: Unordered list style [Expected: asterisk; Actual: dash]markdownlint(MD004)
Is there a way to make the formatter not change the asterisks?
如果是写中文,改成半角的得多难受。。
这是可选项我知道,但为什么全角的符号,后面还会自动插入空格,而且还不支持自定义……
Due to its syntax similar to markdown, yaml
code blocks are formatted as if there are markdown lines, even though if have "markdownFormatter.formatCodes": false
in my settings.json
.
So the following file:
a:
- b
- c:
- d
```yaml
a:
- b
- c:
- d
```
```python
a:
- b
- c:
- d
```
will be wrongly formatted as follows:
a:
+ b
+ c:
- d
``` yaml
a:
+ b
+ c:
- d
```
``` python
a:
+ b
+ c:
- d
```
求 支持jupyter 中的markdown 格式化
I'm getting this error on VS code 1.44.2 in Ubuntu. It used to work well, i don't know what is happening...
Thanks for this cool extension 👍
I'd like to suggest adding the ability to config list numbers and symbols.
For instance:
-
as the only list symbol.1.
as the only numbered list symbol.It's always a pain to see lists like:
1. a
2. b
3. c
When markdown supports the following which helps when you need to reorganize steps 👍
1. a
1. b
1. c
Invoke the Format Document command on a Markdown file.
The file should get formatted.
The file does not get formatted; instead, VSCode displays a notification that There is no formatter for 'markdown' files installed., even though I already have the markdown-formatter extension installed.
Version 0.7.5 of the extension used to work properly but as of 0.7.6, the aforementioned notification appears for every Markdown file which I try to format.
示例文本:
* <https://onedrive.live.com/redir?resid=F3A8A31ABFAC51B0!256&authkey=!AC4-yOEjn0bgrCQ&ithint=file%2crar>
* 下载: Please download from [OneDrive](https://1drv.ms/u/s!ApwdOxIIFBH19TzDv7nRfH5ZsMNL) or [Baiduyun](http://pan.baidu.com/s/1bQ4yHC).
格式化之后
<https://onedrive.live.com/redir?resid=F3A8A31ABFAC51B0!256&authkey=! AC4-yOEjn0bgrCQ&ithint=file%2crar>
下载: Please download from [OneDrive](https://1drv.ms/u/s! ApwdOxIIFBH19TzDv7nRfH5ZsMNL) or Baiduyun.
可以看到,在某些感叹号之后断开了。
markdown-formatter 里面似乎没有中英文之间添加空格的功能?
建议集成 Doctor Jones: https://github.com/Leopoldthecoder/doctor-jones
代码块之外的部分格式化效果还行,但是代码块内就很乱了,如果能像 vetur 那就最好了
比如就不用格式化了
\`\`\` html
<div>htllo</div>
\`\`\`
比如下面的代码
$ npm install miniprogram-to-uniapp - g
放在md里面进行格式化时,,好家伙,变成这样的~~
$ npm install miniprogram - to - uniapp - g
我。。。。
some code-highlighted text\n
changes to some code-highlighted text \n
which Markdown linters then complain about.
I personally also don't like the change of padding code-highlighted segments with whitespace in general and would like to disable this feature.
我发现作者你写的不少snippet和vscode自带的重复了, 并没有必要重写(实际使用的时候两个还会有点分不清):
能不能提供一个选项关闭插件带的snippet?同时在readme里列出一些snippet, 需要的自行添加进用户的snippet即可
这里找到了一种隐藏的方式, 但是依旧比较麻烦microsoft/vscode#10565 (comment)
我现在的做法是直接修改扩展文件里的markdown.json删除我不需要的snippet, 但是更新后肯定需要重来... 开发者有什么建议吗?
Formatted text succeeded!
// 将配置里的全角符号转化为半角符号, 例如 `,:;!“”‘’()?。` , 当设置为false的时候, 自动根据上下文转换符号
charactersTurnHalf = config.get<any>('charactersTurnHalf', false);
这个要如何设置, 我设置为:
"markdownFormatter.charactersTurnHalf": {"charactersTurnHalf": true}
报错: charactersTurnHalf.split is not a function
Hello,
See this example:
#!/bin/bash
SERVER_NAME=`hostname`
echo "You are running this script on ${SERVER_NAME}."
# Output: You are running this script on linuxsvr.
After format, it adds a space after the "=" like this:
SERVER_NAME= `hostname`
And this is invalid in shell/bash.
Could you stop this behaviour for bash codeblock pls?
Thanks for your extension.
Regards,
Tif
对于我当前的配置:
// markdown-formatter conf
"markdownFormatter.codeAreaToBlock": "",
// 自动格式化标点
// "markdownFormatter.fullWidthTurnHalfWidth": "auto",
// 中文标点格式化为英文
"markdownFormatter.fullWidthTurnHalfWidth": ",:;!“”‘’()?。",
"markdownFormatter.formatOpt": {
"indent_size": 2
},
"[markdown]": {
// 自动保存
"editor.formatOnSave": true,
// 显示空格
"editor.renderWhitespace": "all",
// 快速补全
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
// snippet 提示优先
"editor.snippetSuggestions": "top",
"editor.tabCompletion": "on",
// 使用enter 接受提示
"editor.acceptSuggestionOnEnter": "on",
"editor.defaultFormatter": "mervin.markdown-formatter"
}
插件信息:
vscode版本信息:
版本: 1.40.1
提交: 8795a9889db74563ddd43eb0a897a2384129a619
日期: 2019-11-13T16:49:30.162Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.0.0-23-generic
无法格式化文档,会提示如下信息:
如果原始的中文符号句号后有两个空格, 转换后会导致符号后面有两个空格, 可否始终保持一个空格?
原文:
一个空格, 两个空格, 一个空格。 两个空格。 补充文字。
一个空格,两个空格,一个空格。两个空格。补充文字。
格式化之后:
一个空格, 两个空格, 一个空格. 两个空格. 补充文字.
一个空格, 两个空格, 一个空格. 两个空格. 补充文字.
另外对于顿号的格式化问题,英文没有顿号,如果替换,是否可以替换为逗号。或者您可以考虑使用半角逗号。
原文:
阿双方就大家、阿里山的房间了,按时到廊坊……。
格式化之后(顿号后面还多了一个空格):
阿双方就大家、 阿里山的房间了, 按时到廊坊…….
求js版本,想用在web编辑器上
If you format a bolder rule:
- - - - - - -
It will become:
* - - - - - -
And this changes completely the markdown output.
var str = '中文';
var str = '中文‘;
中文输入法情况下 格式化失败。
// markdown-formatter conf
"markdownFormatter.fullWidthTurnHalfWidth": ",:;!“”‘’()?。",
"markdownFormatter.formatULSymbol": true,
"markdownFormatter.spaceAfterFullWidth": true,
"markdownFormatter.formatOpt": {
"indent_size": 4
},
"[markdown]": {
"editor.defaultFormatter": "mervin.markdown-formatter"
},
我发现对于英语文字后面的全角标点并不能转化呀。。。
Line wrap to default 80 or a configurable amount of characters would be excellent.
I have a markdown files with some regexp and when i format, it does the following behaviour:
Before formatting:
# Regexp
## Regex A
`^(.*myPattern.*)$`
## Regex B
`([^\/]+)$`
After formatting:
# Regexp
## Regex A
`^(.*myPattern.*)# Regexp
## Regex B
`([^\/]+)# Regexp
It seems to be removing some characters and appending the Heading 1.
You can test it, just open a .md file paste that and then format.
Congratulations for your extension, i found it very useful.
这是我的配置
"markdownFormatter.codeAreaToBlock": "", "markdownFormatter.fullWidthTurnHalfWidth": "auto", "markdownFormatter.formatOpt": { "indent_size": 2 }, "[markdown]": { "editor.formatOnSave": true, "editor.renderWhitespace": "all", "editor.quickSuggestions": { "other": true, "comments": true, "strings": true }, "editor.snippetSuggestions": "top", "editor.tabCompletion": "on", "editor.acceptSuggestionOnEnter": "on", "editor.defaultFormatter": "mervin.markdown-formatter" }
Because of a unexcepted result with formatter, I need to disable formatter in serveral files.
what I write:
- list1
``` js
console.log(1)
```
- list 2
I set auto format on save, so I press cmd+s
, first time, it changes to be below
* list1
\``` js
console.log(1)
\```
* list 2
and save again:
* list1
\``` js
console.log(1)
\```
* list 2
I add
\
at line start, I don't know how to write nest ``` in codeblock : (
it finally formatting done. but not I want. as image shows
So, I need to disable formatter with files, maybe need something like ignorePath, or support a 'disable' comment in file.
Of course this might be a bug, if can be fixed will be better
Hi!
The extension adds 2 new lines at the end of the file, which conflicts with linting rules. Is there a setting to suppress that?
I added these rules, but they do not make a difference:
"markdownFormatter.formatOpt": {
"end-with-newline": false,
"indent_size": 2,
"preserve-newlines": false,
"max-preserve-newlines": 1
},
(When I disable the markdown-formatter extension, no empty lines are added, so I assume it is something that this extension does and not VScode...)
Thank you!
* word,`code`
* word, `code`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.