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

fix: port over markdown null check + remove spruios import of firebase #489

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/tutors-gen-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tutors-gen-lib",
"version": "3.2.0",
"version": "3.2.3",
"description": "Library for tutors generators",
"scripts": {
"build": "tsc --build",
Expand Down
6 changes: 3 additions & 3 deletions cli/tutors-gen-lib/src/models/markdown-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import footnote from "markdown-it-footnote";
// @ts-ignore
import deflist from "markdown-it-deflist";
import type { Course } from "./lo-types";
import { browserLocalPersistence } from "firebase/auth";

const markdownIt: any = new MarkdownIt({
html: false, // Enable HTML tags in source
Expand All @@ -34,13 +33,13 @@ const markdownIt: any = new MarkdownIt({
} catch (__) {}
}
return '<pre class="hljs"><code>' + markdownIt.utils.escapeHtml(str) + "</code></pre>";
}
},
});

const tocOptions = { includeLevel: [1, 2, 3] };
markdownIt.use(latex);
markdownIt.use(anchor, {
permalink: anchor.permalink.headerLink()
permalink: anchor.permalink.headerLink(),
});

markdownIt.use(toc, tocOptions);
Expand Down Expand Up @@ -99,6 +98,7 @@ export function convertLabToHtml(course: Course, lab: Lab) {
}

export function convertLoToHtml(course: Course, lo: Lo) {
if (!lo.contentMd) return;
if (lo.type === "lab") {
convertLabToHtml(course, lo as Lab);
} else {
Expand Down
2 changes: 1 addition & 1 deletion cli/tutors-gen-lib/src/tutors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resourceBuilder } from "./generator/resource-builder";
import { writeFile } from "./generator/file-utils";
import { generateNetlifyToml } from "./generator/netlify";

export const version = "3.2.0";
export const version = "3.2.3";

export function parseCourse(folder: string): Course {
resourceBuilder.buildTree(folder);
Expand Down
4 changes: 2 additions & 2 deletions cli/tutors-publish-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tutors-publish-html",
"version": "3.2.0",
"version": "3.2.3",
"description": "Static course web site generator - html emitter",
"main": "./src/tutors-publish-html.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
"nunjucks": "^3.2.3",
"path": "^0.12.7",
"shelljs": "^0.8.5",
"tutors-gen-lib": "^3.2.0"
"tutors-gen-lib": "^3.2.3"
},
"devDependencies": {
"prettier": "2.8.4",
Expand Down
4 changes: 2 additions & 2 deletions cli/tutors-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tutors-publish",
"version": "3.2.0",
"version": "3.2.3",
"description": "Static course web site generator - json emitter",
"main": "./src/tutors-publish.js",
"scripts": {
Expand All @@ -17,7 +17,7 @@
"tutors-publish": "./src/tutors-publish.js"
},
"dependencies": {
"tutors-gen-lib": "^3.2.0"
"tutors-gen-lib": "^3.2.3"
},
"devDependencies": {
"prettier": "2.8.8",
Expand Down