forked from cory/tildefriends
Docs tweaks. Linkify hashtags.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4034 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@@ -8,7 +8,7 @@ async function loadDocument(name) {
|
||||
<style>body { background: #ccc; }</style>`;
|
||||
var md = utf8Decode(await getFile(name + '.md'));
|
||||
if (!md) {
|
||||
md = "File not found.";
|
||||
md = `File not found: ${JSON.stringify(name)}.`;
|
||||
}
|
||||
var parsed = new commonmark.Parser().parse(md);
|
||||
var html = new commonmark.HtmlRenderer().render(parsed);
|
||||
@@ -22,7 +22,7 @@ async function main() {
|
||||
|
||||
core.register('message', function(message) {
|
||||
if (message.event == 'hashChange') {
|
||||
loadDocument(message.hash.substring(1));
|
||||
loadDocument((message.hash || '#index').substring(1));
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user