Skip to content

Commit

Permalink
Improve rendering options and update lib.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Jul 7, 2024
1 parent 269cc3d commit cee9c7a
Show file tree
Hide file tree
Showing 9 changed files with 246 additions and 96 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@

- Fixed null tooltip handling.
- Updated lib.html.

## 2.2.0

- Added rendering options for better flexibility.
- Added heading post processing.
- Added highlight class name option.
- Added link class name options.
- Added table class name option.
- Updated lib.html.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lambdaurora/libmd",
"version": "2.1.2",
"version": "2.2.0",
"exports": "./mod.ts",
"tasks": {
"build": "deno run --allow-read --allow-write --allow-net --allow-env=HOME,ESBUILD_BINARY_PATH,ESBUILD_WORKER_THREADS,XDG_CACHE_HOME,NPM_CONFIG_REGISTRY,DENO_REGISTRY_URL --allow-run build_logic/build.ts",
Expand Down
6 changes: 3 additions & 3 deletions deno.lock

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

2 changes: 1 addition & 1 deletion examples/previewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h1>lib.md Markdown previewer</h1>
</section>
<div id="splitter"></div>
<section id="preview" style="padding: 0 1em;">
<div id="markdown_preview" style="display: block;"></div>
<article id="markdown_preview" style="display: block;"></article>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/components/prism-core.min.js" data-manual></script>
Expand Down
7 changes: 4 additions & 3 deletions examples/previewer/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ let render_options: Partial<md.DomRenderOptions> = {
latex: {
katex: katex
},
link: {
inline_class_name: "ls_raw_link"
},
spoiler: { enable: true },
table: {
process: t => {
t.attr("class", "ls_grid_table");
}
class_name: "ls_grid_table"
},
parent: markdown_preview
};
Expand Down
2 changes: 1 addition & 1 deletion import_map.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"imports": {
"@lambdaurora/libhtml": "jsr:@lambdaurora/libhtml@^1.2.3",
"@lambdaurora/libhtml": "jsr:@lambdaurora/libhtml@^1.3.1",
"@std/assert": "jsr:@std/assert@^0.225.3",
"@std/fs": "jsr:@std/fs@^0.229.1",
"@oak/oak": "jsr:@oak/oak@^16.0.0",
Expand Down
Loading

0 comments on commit cee9c7a

Please sign in to comment.