Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
7393c524
Commit
7393c524
authored
Aug 22, 2016
by
cinwell.li
Committed by
GitHub
Aug 22, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #84 from eleme/feat/next-update-markdown
update markdown config
parents
0527a79a
4206484e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
scripts/cooking.demo.js
scripts/cooking.demo.js
+10
-12
No files found.
scripts/cooking.demo.js
View file @
7393c524
...
@@ -53,24 +53,22 @@ cooking.add('vueMarkdown', {
...
@@ -53,24 +53,22 @@ cooking.add('vueMarkdown', {
anchorLinkSymbol
:
''
,
anchorLinkSymbol
:
''
,
anchorClassName
:
'
anchor
'
anchorClassName
:
'
anchor
'
}],
}],
[
require
(
'
markdown-it-container
'
),
'
code
'
,
{
[
require
(
'
markdown-it-container
'
),
'
demo
'
,
{
validate
:
function
(
params
)
{
validate
:
function
(
params
)
{
return
params
.
trim
().
match
(
/^
code
\s
+
(
.*
)
$/
);
return
params
.
trim
().
match
(
/^
demo
\s
+
(
.*
)
$/
);
},
},
render
:
function
(
tokens
,
idx
)
{
render
:
function
(
tokens
,
idx
)
{
var
m
=
tokens
[
idx
].
info
.
trim
().
match
(
/^code
\s
+
(
.*
)
$/
);
var
m
=
tokens
[
idx
].
info
.
trim
().
match
(
/^demo
\s
+
(
.*
)
$/
);
if
(
tokens
[
idx
].
nesting
===
1
)
{
if
(
tokens
[
idx
].
nesting
===
1
)
{
// opening tag
var
html
=
tokens
[
idx
+
1
].
content
;
return
'
<div class="details">
'
+
return
`<section class="demo">
`<div class="summary">
${
md
.
utils
.
escapeHtml
(
m
[
1
])}
</div>`
+
<div class="source">
${
html
}
</div>
'
<div class="code">
'
;
<div class="meta">
<div class="description">
${
md
.
utils
.
escapeHtml
(
m
[
1
])}
</div>
}
else
{
<div class="highlight">`
;
// closing tag
return
'
</div></div>
\n
'
;
}
}
return
'
</section>
\n
'
;
}
}
}]
}]
],
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment