Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
2
2015-12-uni-ffm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CmS
2015-12-uni-ffm
Commits
2cdd1afe
Commit
2cdd1afe
authored
11 years ago
by
VonC
Browse files
Options
Downloads
Patches
Plain Diff
Remove console.log debugs, and fix tabs
parent
492a0949
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugin/markdown/markdown.js
+0
-4
0 additions, 4 deletions
plugin/markdown/markdown.js
test/test-markdown-attributes.html
+2
-2
2 additions, 2 deletions
test/test-markdown-attributes.html
with
2 additions
and
6 deletions
plugin/markdown/markdown.js
+
0
−
4
View file @
2cdd1afe
...
...
@@ -185,11 +185,9 @@
slideAttributes
=
matchAttributes
?
matchAttributes
[
1
]
:
""
;
dataAttributes
=
""
;
if
(
slideAttributes
!=
""
)
{
// console.log('all attr=' + slideAttributes );
// http://stackoverflow.com/questions/18025762/javascript-regex-replace-all-word-characters-except-word-characters-between-ch
// Keep only data-attributes for the parent slide section.
dataAttributes
=
slideAttributes
.
replace
(
/
(
data-
\S
+=
\"[^\"]
+
?\")
|
\w
|
[\"
=
]
/g
,
function
(
a
,
b
)
{
return
b
||
''
;
});
// console.log('new attr=' + dataAttributes );
}
markdownSections
+=
'
<section
'
+
options
.
attributes
+
'
'
+
dataAttributes
+
'
>
'
;
...
...
@@ -197,7 +195,6 @@
matchAttributes
=
slideAttributesSeparatorRegex
.
exec
(
child
);
slideAttributes
=
matchAttributes
?
matchAttributes
[
1
]
:
""
;
child
=
matchAttributes
?
child
.
replace
(
slideAttributesSeparatorRegex
,
""
)
:
child
// console.log('slide attributes ' + options.slideAttributesSeparator + ' => ' + slideAttributes)
markdownSections
+=
'
<section
'
+
slideAttributes
+
'
data-markdown>
'
+
createMarkdownSlide
(
child
,
options
)
+
'
</section>
'
;
}
);
...
...
@@ -207,7 +204,6 @@
matchAttributes
=
slideAttributesSeparatorRegex
.
exec
(
sectionStack
[
i
]
);
slideAttributes
=
matchAttributes
?
matchAttributes
[
1
]
:
""
;
content
=
matchAttributes
?
sectionStack
[
i
].
replace
(
slideAttributesSeparatorRegex
,
""
)
:
sectionStack
[
i
]
// console.log('Slide attributes ' + options.slideAttributesSeparator + ' => ' + slideAttributes)
markdownSections
+=
'
<section
'
+
options
.
attributes
+
'
'
+
slideAttributes
+
'
data-markdown>
'
+
createMarkdownSlide
(
content
,
options
)
+
'
</section>
'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
test/test-markdown-attributes.html
+
2
−
2
View file @
2cdd1afe
...
...
@@ -25,8 +25,8 @@
<section
data-markdown
data-separator=
"^\n\n\n"
data-vertical=
"^\n\n"
data-notes=
"^Note:"
data-attributes=
"^\s*?--\s(.*?)$"
data-charset=
"utf-8"
>
data-attributes=
"^\s*?--\s(.*?)$"
data-charset=
"utf-8"
>
<script
type=
"text/template"
>
#
Test
attributes
in
Markdown
##
Slide
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment