Skip to content

Commit

Permalink
Merge branch 'main' into docs/readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu authored May 28, 2022
2 parents f42c42d + 116ccce commit 6b197e4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
8 changes: 6 additions & 2 deletions server/lib/notion/helpers/getListItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default async function getListItems(
if (!list) {
return null;
}
const backSide = await getChildren(result, handler);
const backSide = await getChildren(list, handler);
handler.skip.push(result.id);
const isTodo = type === 'to_do';
const checked =
Expand All @@ -36,7 +36,11 @@ export default async function getListItems(
className={`checkbox checkbox-${list.checked ? 'on' : 'off'}`}
></div>
)}
{renderTextChildren(list.text, handler.settings)}
<div
dangerouslySetInnerHTML={{
__html: renderTextChildren(list.text, handler.settings),
}}
/>
{backSide && (
<div
className={`${checkedClass}`}
Expand Down
4 changes: 2 additions & 2 deletions server/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 server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"notion2anki"
],
"author": "Alexander Alemayhu",
"version": "0.14.6",
"version": "1.0.0-alpha.0",
"engines": {
"node": ">=12.0.0"
},
Expand Down
13 changes: 6 additions & 7 deletions server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import cookieParser from 'cookie-parser';
import * as dotenv from 'dotenv';

import { IsDebug } from './lib/debug';
if (IsDebug()) {
const localEnvFile = path.join(__dirname, '.env');
if (existsSync(localEnvFile)) {
dotenv.config({ path: localEnvFile });
}
}

import { ALLOWED_ORIGINS, BUILD_DIR, INDEX_FILE } from './lib/constants';
import ErrorHandler from './lib/misc/ErrorHandler';
Expand All @@ -30,13 +36,6 @@ import { ScheduleCleanup } from './lib/jobs/JobHandler';
import ConversionJob from './lib/jobs/ConversionJob';
import RequireAuthentication from './middleware/RequireAuthentication';

if (IsDebug()) {
const localEnvFile = path.join(__dirname, '.env');
if (existsSync(localEnvFile)) {
dotenv.config({ path: localEnvFile });
}
}

function serve() {
const templateDir = path.join(__dirname, 'templates');
const app = express();
Expand Down
7 changes: 1 addition & 6 deletions server/templates/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ body {
}

.front-text-post {
color: gray;
font-size: 1rem;
}

.back-text {
font-size: 1.5rem;
text-align: left;
}

.extra {
color: gray;
}
}

0 comments on commit 6b197e4

Please sign in to comment.