-
Notifications
You must be signed in to change notification settings - Fork 781
Closed

Description
Firstly I test this code in node
const github = require('github-api');
const gh = new github({
username: "**********",
password: "**********"
});
const markdown = gh.getMarkdown();
var options = {
text: '# Hello world!'
};
markdown.render(options).then(function({data:html}) {
console.log(html)
});
So I get flowing string.
<h1>
<a id="user-content-hello-world" class="anchor" href="#hello-world" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Hello world!</h1>
But when I run this code in browser
<script src="GitHub.bundle.js"></script>
<script>
const gh = new GitHub({
username: "**********",
password: "**********"
});
const markdown = gh.getMarkdown();
var options = {
text: '# Hello world!'
};
markdown.render(options).then(function({data:html}) {
console.log(html)
});
</script>
I get a null
,so please help me.......
Metadata
Metadata
Assignees
Labels
No labels