掘金markdown语法测试

PS:Pc上都是用VScode markdownpreviewenhace插件写markdown的,复制过来掘金后,发现掘金对于markdown语法支持的不错噢


1.标题

#” 后加个空格。除此之外,还有 5 级标题,依次有不同的字体大小,即
# 一级标题
## 二级标题
复制代码

2.文字

粗体

**粗体**
复制代码

斜体

*斜体*
复制代码

删除号

~~删除号~~
复制代码

文字内部区分

文字内部`区分`
复制代码

上标下标 30^th^ H~2~O

30^th^
H~2~O
复制代码

脚注 Content [^1]

[^1]: Hi! This is a footnote
复制代码

缩略

*[缩略]:这是一个缩略

*[缩略]:这是一个缩略
复制代码

==标记==

==标记==
复制代码

2.表格

DayMealPrice
Mondaypasta$6
Tuesdaychicken$8
| Day     | Meal     | Price   
:--------|---------:|:-------:
| Monday  | pasta    | $6      
| Tuesday | chicken  | $8
复制代码

3.Checkbox

  • @mentions, #refs, links, formatting, and tags supported
  • list syntax required (any unordered or ordered list supported)
  • this is a complete item
  • this is an incomplete item
- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported 
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item
复制代码

4.层次

  • 一层
    • 二层
      • 三层
* 一层
    * 二层
        * 三层
复制代码

5.链接

这是一个链接

[这是一个链接](http://)
复制代码

6.代码块

#include "stdio.h" 

void main()
{
    int i = 0;
    if()
}
复制代码
c++ {.line-numbers}
#include "stdio.h" 

void main()
{
    int i = 0;
    if()
}
复制代码

7.数学公式(MathJax插件)

x = {-b \pm \sqrt{b^2-4ac} \over 2a}
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
复制代码

8.图片

推荐使用html语言来插入图片,因为markdown语法无法调整图片大小

>推荐使用html语言来插入图片,因为markdown语法无法调整图片大小

<img src="https://user-gold-cdn.xitu.io/2019/1/4/16817cdab79e6c92?w=1024&h=1664&f=png&s=27960" width = "100" height = "100" alt="图片名称" align=center />
复制代码

9.图表

9.1.流程图

st=>start: Start
op=>operation: Your Operation
cond=>condition: Yes or No?
e=>end
st->op->cond
cond(yes)->e
cond(no)->op
复制代码

9.2.时序图

graph LR
    A --> B
    B --> C
    A --> C
复制代码

9.3.vega

{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
  "width": 400,
  "height": 200,
  "padding": 5,

  "data": [
    {
      "name": "table",
      "values": [
        {"category": "A", "amount": 28},
        {"category": "B", "amount": 55},
        {"category": "C", "amount": 43},
        {"category": "D", "amount": 91},
        {"category": "E", "amount": 81},
        {"category": "F", "amount": 53},
        {"category": "G", "amount": 19},
        {"category": "H", "amount": 87}
      ]
    }
  ],

  "signals": [
    {
      "name": "tooltip",
      "value": {},
      "on": [
        {"events": "rect:mouseover", "update": "datum"},
        {"events": "rect:mouseout",  "update": "{}"}
      ]
    }
  ],

  "scales": [
    {
      "name": "xscale",
      "type": "band",
      "domain": {"data": "table", "field": "category"},
      "range": "width",
      "padding": 0.05,
      "round": true
    },
    {
      "name": "yscale",
      "domain": {"data": "table", "field": "amount"},
      "nice": true,
      "range": "height"
    }
  ],

  "axes": [
    { "orient": "bottom", "scale": "xscale" },
    { "orient": "left", "scale": "yscale" }
  ],

  "marks": [
    {
      "type": "rect",
      "from": {"data":"table"},
      "encode": {
        "enter": {
          "x": {"scale": "xscale", "field": "category"},
          "width": {"scale": "xscale", "band": 1},
          "y": {"scale": "yscale", "field": "amount"},
          "y2": {"scale": "yscale", "value": 0}
        },
        "update": {
          "fill": {"value": "steelblue"}
        },
        "hover": {
          "fill": {"value": "red"}
        }
      }
    },
    {
      "type": "text",
      "encode": {
        "enter": {
          "align": {"value": "center"},
          "baseline": {"value": "bottom"},
          "fill": {"value": "#333"}
        },
        "update": {
          "x": {"scale": "xscale", "signal": "tooltip.category", "band": 0.5},
          "y": {"scale": "yscale", "signal": "tooltip.amount", "offset": -2},
          "text": {"signal": "tooltip.amount"},
          "fillOpacity": [
            {"test": "datum === tooltip", "value": 0},
            {"value": 1}
          ]
        }
      }
    }
  ]
}
复制代码

10.ppt

预览要新建一个单独的md

<!-- slide -->
# hi there

<!-- slide -->
i'v got you
复制代码

.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值