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

Fails loading markdown other than README.md #3

Open
adhuliya opened this issue Mar 30, 2018 · 0 comments
Open

Fails loading markdown other than README.md #3

adhuliya opened this issue Mar 30, 2018 · 0 comments

Comments

@adhuliya
Copy link

adhuliya commented Mar 30, 2018

Markdown files with other than default name fails to load using the global variable file declared in the <head> element:

<script>
var file = "other.md";
</script>

When the following line in render.js tests the condition,

var file = file || "README.md";

the first access to the file object is always undefined (due to hoisting), hence README.md is chosen by default.

Changing the above line to:

var file = this.file || "README.md";

solves the issue for me. (Notice the use of this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant