Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
feat(md-enhance): add new options
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed May 31, 2022
1 parent 520e3bf commit 6b589e3
Show file tree
Hide file tree
Showing 65 changed files with 2,325 additions and 584 deletions.
16 changes: 8 additions & 8 deletions demo/src/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ $$

### Demo

::: demo A normal demo
::: normal-demo A normal demo

```html
<h1>Mr.Hope</h1>
Expand All @@ -222,7 +222,7 @@ span {
:::: details Code

````md
::: demo A normal demo
::: normal-demo A normal demo

```html
<h1>Mr.Hope</h1>
Expand All @@ -246,7 +246,7 @@ span {

::::

::: demo [react] A react demo
::: react-demo A react demo

```js
export default class App extends React.Component {
Expand Down Expand Up @@ -275,7 +275,7 @@ export default class App extends React.Component {
:::: details Code

````md
::: demo [react] A react demo
::: react-demo A react demo

```js
export default class App extends React.Component {
Expand Down Expand Up @@ -304,7 +304,7 @@ export default class App extends React.Component {

::::

::: demo [vue] A vue demo
::: vue-demo A vue demo

```vue
<template>
Expand All @@ -329,7 +329,7 @@ export default {
:::: details Code

````md
::: demo [vue] A vue demo
::: vue-demo A vue demo

```vue
<template>
Expand All @@ -354,7 +354,7 @@ export default {

::::

::: demo A normal demo
::: normal-demo A normal demo

```md
# Title
Expand Down Expand Up @@ -383,7 +383,7 @@ h1 {
:::: details Code

````md
::: demo A normal demo
::: normal-demo A normal demo

```md
# Title
Expand Down
16 changes: 8 additions & 8 deletions demo/src/zh/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ $$

### 代码案例

::: demo 一个普通 Demo
::: normal-demo 一个普通 Demo

```html
<h1>Mr.Hope</h1>
Expand All @@ -222,7 +222,7 @@ span {
:::: details 代码

````md
::: demo 一个普通 Demo
::: normal-demo 一个普通 Demo

```html
<h1>Mr.Hope</h1>
Expand All @@ -246,7 +246,7 @@ span {

::::

::: demo [react] 一个 React Demo
::: react-demo 一个 React Demo

```js
export default class App extends React.Component {
Expand Down Expand Up @@ -275,7 +275,7 @@ export default class App extends React.Component {
:::: details 代码

````md
::: demo [react] 一个 React Demo
::: react-demo 一个 React Demo

```js
export default class App extends React.Component {
Expand Down Expand Up @@ -304,7 +304,7 @@ export default class App extends React.Component {

::::

::: demo [vue] 一个 Vue Demo
::: vue-demo 一个 Vue Demo

```vue
<template>
Expand All @@ -329,7 +329,7 @@ export default {
:::: details 代码

````md
::: demo [vue] 一个 Vue Demo
::: vue-demo 一个 Vue Demo

```vue
<template>
Expand All @@ -354,7 +354,7 @@ export default {

::::

::: demo 一个普通 Demo
::: normal-demo 一个普通 Demo

```md
# 标题
Expand Down Expand Up @@ -383,7 +383,7 @@ h1 {
:::: details 代码

````md
::: demo 一个普通 Demo
::: normal-demo 一个普通 Demo

```md
# 标题
Expand Down
6 changes: 3 additions & 3 deletions docs/md-enhance/src/guide/demo/normal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: code
## Syntax

````md
::: demo Optional title text
::: normal-demo Optional title text

```html
<!-- html code -->
Expand Down Expand Up @@ -43,7 +43,7 @@ icon: code

## Demo

::: demo Demo
::: normal-demo Demo

```html
<h1>Mr.Hope</h1>
Expand All @@ -67,7 +67,7 @@ span {
:::: details Code

````md
::: demo Demo
::: normal-demo Demo

```html
<h1>Mr.Hope</h1>
Expand Down
10 changes: 5 additions & 5 deletions docs/md-enhance/src/guide/demo/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: react
## Syntax

````md
::: demo [react] Optional title text
::: react-demo Optional title text

```js
// your script, exporting your react component through `export default`
Expand All @@ -33,7 +33,7 @@ icon: react

## Demo

::: demo [react] A function-based React Demo
::: react-demo A function-based React Demo

```js
export default () => {
Expand Down Expand Up @@ -65,7 +65,7 @@ export default () => {
:::: details Code

````md
::: demo [react] A function-based React Demo
::: react-demo A function-based React Demo

```js
export default () => {
Expand Down Expand Up @@ -97,7 +97,7 @@ export default () => {

::::

::: demo [react] A class-based React Demo
::: react-demo A class-based React Demo

```js
export default class App extends React.Component {
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class App extends React.Component {
:::: details Code

````md
::: demo [react] A class-based React Demo
::: react-demo A class-based React Demo

```js
export default class App extends React.Component {
Expand Down
6 changes: 3 additions & 3 deletions docs/md-enhance/src/guide/demo/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
You should use the following syntax:

````md
::: demo [type] Optional title text
::: normal-demo Optional title text

```html
<!-- ↑ use available ones -->
Expand Down Expand Up @@ -95,7 +95,7 @@ Available CSS languages:
### Not supported language demo

::: demo A demo using language not supoprted by browsers
::: normal-demo A demo using language not supoprted by browsers

```md
# Title
Expand Down Expand Up @@ -124,7 +124,7 @@ h1 {
:::: details Code

````md
::: demo A normal demo
::: normal-demo A normal demo

```md
# Title
Expand Down
6 changes: 3 additions & 3 deletions docs/md-enhance/src/guide/demo/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: vue
## Syntax

````md
::: demo [vue] Optional title text
::: vue-demo Optional title text

```vue
<!-- ↑ You can also use `html` -->
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {

## Demo

::: demo [vue] A Vue Demo
::: vue-demo A Vue Demo

```vue
<template>
Expand Down Expand Up @@ -70,7 +70,7 @@ export default {
:::: details Code

````md
::: demo [vue] A Vue Demo
::: vue-demo A Vue Demo

```vue
<template>
Expand Down
2 changes: 1 addition & 1 deletion docs/md-enhance/src/guide/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ $$

### Code Demo

::: demo A normal demo
::: normal-demo A normal demo

```html
<h1>Mr.Hope</h1>
Expand Down
6 changes: 3 additions & 3 deletions docs/md-enhance/src/zh/guide/demo/normal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: code
## 格式

````md
::: demo 可选的标题文字
::: normal-demo 可选的标题文字

```html
<!-- html code -->
Expand Down Expand Up @@ -43,7 +43,7 @@ icon: code

## 案例

::: demo Demo 演示
::: normal-demo Demo 演示

```html
<h1>Mr.Hope</h1>
Expand All @@ -67,7 +67,7 @@ span {
:::: details 代码

````md
::: demo Demo 演示
::: normal-demo Demo 演示

```html
<h1>Mr.Hope</h1>
Expand Down
10 changes: 5 additions & 5 deletions docs/md-enhance/src/zh/guide/demo/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: react
## 格式

````md
::: demo [react] 可选的标题文字
::: react-demo 可选的标题文字

```js
// 放置脚本,并通过 `export default` 导出你的 react 组件
Expand All @@ -33,7 +33,7 @@ icon: react

## 演示

::: demo [react] 一个函数式 React Demo
::: react-demo 一个函数式 React Demo

```js
export default () => {
Expand Down Expand Up @@ -65,7 +65,7 @@ export default () => {
:::: details 代码

````md
::: demo [react] 一个函数式 React Demo
::: react-demo 一个函数式 React Demo

```js
export default () => {
Expand Down Expand Up @@ -97,7 +97,7 @@ export default () => {

::::

::: demo [react] 一个类式 React Demo
::: react-demo 一个类式 React Demo

```js
export default class App extends React.Component {
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class App extends React.Component {
:::: details 代码

````md
::: demo [react] 一个类式 React Demo
::: react-demo 一个类式 React Demo

```js
export default class App extends React.Component {
Expand Down
6 changes: 3 additions & 3 deletions docs/md-enhance/src/zh/guide/demo/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
请使用以下语法:

````md
::: demo [类型] 可选的标题文字
::: normal-demo 可选的标题文字

```html
<!-- ↑ 使用可用的语言 -->
Expand Down Expand Up @@ -95,7 +95,7 @@ JSON 块是可选的,可用的配置详见 [配置](../../config.md#demo)。
### 不支持的语言演示

::: demo 一个使用浏览器不支持解析语言 Demo
::: normal-demo 一个使用浏览器不支持解析语言 Demo

```md
# 标题
Expand Down Expand Up @@ -124,7 +124,7 @@ h1 {
:::: details 代码

````md
::: demo 一个使用浏览器不支持解析语言 Demo
::: normal-demo 一个使用浏览器不支持解析语言 Demo

```md
# 标题
Expand Down
Loading

0 comments on commit 6b589e3

Please sign in to comment.