Skip to content

Commit

Permalink
Removed the "data-" prefix of the ToC attributes.
Browse files Browse the repository at this point in the history
For consistancy, since in the initial strapdown project, attributes
("theme") are not prefixed.
Affects #9
  • Loading branch information
ndossougbe committed Jul 13, 2014
1 parent 28e0564 commit d2c3990
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</head>

<body>
<textarea theme="lumen" style="display:none;" data-toc="1" data-toc-top-link="1">
<textarea theme="lumen" style="display:none;" toc="1" toc-top-link="1">
# Strapdown.js

Strapdown.js makes it embarrassingly simple to create elegant Markdown documents. **No server-side compilation required.** Use it to quickly document your projects, create tutorials, home pages, etc. (For example, the page you are reading was generated by Strapdown).
Expand Down
4 changes: 2 additions & 2 deletions src/strapdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
document.head.appendChild(linkEl);

// Check if ToC is required
if (markdownEl.getAttribute('data-toc')) {
if (markdownEl.getAttribute('toc')) {
// Extra features: back to top
var tocTopLink = markdownEl.getAttribute('data-toc-top-link');
var tocTopLink = markdownEl.getAttribute('toc-top-link');
if (tocTopLink) {
window.strapdownToc = {
includeBackToTopLink: true
Expand Down
2 changes: 1 addition & 1 deletion test.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8" />
<title>Strapdown.js - Instant and elegant Markdown documents</title>

<textarea theme="lumen" data-toc="1" data-toc-top-link="Top" style="display:none;">
<textarea theme="lumen" toc="1" toc-top-link="Top" style="display:none;">

# Markdown text goes in here or there or there or there

Expand Down
4 changes: 2 additions & 2 deletions v/0.3/strapdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ var PR=win['PR']={'createSimpleLexer':createSimpleLexer,'registerLangHandler':re
document.head.appendChild(linkEl);

// Check if ToC is required
if (markdownEl.getAttribute('data-toc')) {
if (markdownEl.getAttribute('toc')) {
// Extra features: back to top
var tocTopLink = markdownEl.getAttribute('data-toc-top-link');
var tocTopLink = markdownEl.getAttribute('toc-top-link');
if (tocTopLink) {
window.strapdownToc = {
includeBackToTopLink: true
Expand Down

0 comments on commit d2c3990

Please sign in to comment.