Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Commit

Permalink
2.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dvargas92495 committed Apr 9, 2021
1 parent 3789191 commit bec663c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "generate-roam-site",
"description": "Generate a static site from a Roam Graph.",
"version": "2.6.3",
"version": "2.6.4",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ const convertContentToHtml = ({
const classlist = [];
const textToParse = t.text.replace(/#\.([^\s]*)/g, (_, className) => {
classlist.push(className);
return '';
})
return "";
});
const inlineMarked = parseInline(textToParse, {
pagesToHrefs,
components: componentsWithChildren,
Expand All @@ -338,10 +338,10 @@ const convertContentToHtml = ({
const innerHtml = `<${HEADINGS[t.heading]}>${inlineMarked}</${
HEADINGS[t.heading]
}>\n${children}`;
if ( level > 0 && viewType === "document") {
classlist.push('document-bullet');
if (level > 0 && viewType === "document") {
classlist.push("document-bullet");
}
const attrs = classlist.length ? ` class="${classlist.join(' ')}"` : ''
const attrs = classlist.length ? ` class="${classlist.join(" ")}"` : "";
if (level === 0 && viewType === "document") {
return `<div${attrs}>${innerHtml}</div>`;
}
Expand Down

0 comments on commit bec663c

Please sign in to comment.