Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix 1320] the {docsify-updated} in the sample code has been rendered. #1322

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/write-a-plugin.md
Expand Up @@ -87,7 +87,7 @@ window.$docsify = {
editHtml +
html +
'\n----\n' +
'Last modified {docsify-updated} ' +
'Last modified {docsify-updated}' +
editHtml
);
});
Expand All @@ -107,5 +107,8 @@ console.log(window.Docsify.version)
Current version: <span id='tip-version'>loading</span>

<script>
document.getElementById('tip-version').innerText = Docsify.version
document.getElementById('tip-version').innerText = Docsify.version
// fix1320 replace the content to show the {docsify-ignore} example in case of being replaced in default.
let text = document.getElementsByClassName("lang-js")[2].innerHTML.replace(/Last modified .*'/,"Last modified {docsify-updated<span>}'</span>")
document.getElementsByClassName("lang-js")[2].innerHTML = text
</script>