Skip to content

Commit 0e3a892

Browse files
committed
Some cleanup from 0.24.0
Resolves #2222 Resolves #2223
1 parent a6e6544 commit 0e3a892

File tree

6 files changed

+29
-10
lines changed

6 files changed

+29
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Unreleased
22

3+
### Bug Fixes
4+
5+
- Improve detection for legacy JSDoc `@example` tags, #2222.
6+
- The page footer will now appear at the bottom of the page even if the page is short, #2223.
7+
38
# v0.24.0 (2023-04-08)
49

510
### Breaking Changes

src/lib/converter/comments/parser.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ function exampleBlockContent(
268268
const end = lexer.done() || lexer.peek();
269269
lexer.release();
270270

271-
if (content.some((part) => part.kind === "code")) {
271+
if (
272+
content.some(
273+
(part) => part.kind === "code" && part.text.startsWith("```")
274+
)
275+
) {
272276
return blockContent(comment, lexer, config, warning);
273277
}
274278

src/test/converter/inheritance/specs.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -527,17 +527,9 @@
527527
{
528528
"tag": "@example",
529529
"content": [
530-
{
531-
"kind": "text",
532-
"text": "This function inherited commentary from the "
533-
},
534530
{
535531
"kind": "code",
536-
"text": "`functionSource`"
537-
},
538-
{
539-
"kind": "text",
540-
"text": " function"
532+
"text": "```ts\nThis function inherited commentary from the `functionSource` function\n```"
541533
}
542534
]
543535
},

src/test/converter2/issues/gh2222.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* @example
3+
* let x = `str`
4+
*/
5+
export const example = 1;

src/test/issues.c2.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,4 +1039,15 @@ describe("Issue Tests", () => {
10391039
equal(param.type?.type, "query");
10401040
equal(param.type.queryType.reflection?.name, "TypeEmitter");
10411041
});
1042+
1043+
it("#2222", () => {
1044+
const project = convert();
1045+
const example = query(project, "example");
1046+
equal(
1047+
Comment.combineDisplayParts(
1048+
example.comment?.getTag("@example")?.content
1049+
),
1050+
"```ts\nlet x = `str`\n```"
1051+
);
1052+
});
10421053
});

static/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ dd {
228228

229229
.container-main {
230230
margin: 0 auto;
231+
/* toolbar, footer, margin */
232+
min-height: calc(100vh - 41px - 56px - 4rem);
231233
}
232234

233235
@keyframes fade-in {

0 commit comments

Comments
 (0)