Skip to content

Commit

Permalink
Tried new error msg.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisForti committed Sep 9, 2024
1 parent 3a9f098 commit 1261209
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion parse-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function validateMetadata(metadata: unknown, fileName: string) {
if ("message" in (error as Error)) {
console.error(
"\x1b[34mThere was an error inside of " + fileName + ":\n\x1b[0m",
// @ts-expect-error
// @ts-expect-error: We already checked for message key on error
error.message,
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/posts/posts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"id": "c814ccf3-bd40-497a-8554-1d9e4b02b31a",
"id": "3000c380-4d3b-4632-b914-e0da4235cca4",
"metadata": {
"title": "Understanding TypeScript",
"published": true,
Expand All @@ -16,7 +16,7 @@
"html": "<h1>Content</h1>\n<h2>Introduction</h2>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit aliquam finibus.</p>\n<h2>Main Content</h2>\n<p>Detailed content goes here. Include sections, lists, code snippets, images, tables, etc.</p>\n<h3>Subsection</h3>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus</p>\n"
},
{
"id": "31b4ed7a-4699-4e29-b443-e751f4c6899b",
"id": "c8e16e6f-dfba-4767-9150-a0b87894ef69",
"metadata": {
"published": true,
"title": "Example",
Expand All @@ -28,7 +28,7 @@
"html": "<h1>Example</h1>\n<p>This is an example post.\nHere is some code:</p>\n<pre><code class=\"language-js\">const helloWorld = &quot;Hello, World!&quot;;\n\nconsole.log(helloWorld);\n</code></pre>\n<h2>Example 2</h2>\n<p>This is an example <code>of a inline code block</code>.</p>\n<h3>Example 3</h3>\n<p>This is an example of a list:</p>\n<ul>\n<li>Item 1<ul>\n<li>Nested Item 1</li>\n<li>Nested Item 2</li>\n</ul>\n</li>\n<li>Item 2<ul>\n<li>Nested Item 1<ul>\n<li>Deeply Nested Item 1</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>Item 3</li>\n</ul>\n<h4>Example 4</h4>\n<p>This is an example of a numbered list:</p>\n<ol>\n<li>Item 1<ol>\n<li>Nested Item 1</li>\n<li>Nested Item 2</li>\n</ol>\n</li>\n<li>Item 2<ol>\n<li>Nested Item 1<ol>\n<li>Deeply Nested Item 1</li>\n</ol>\n</li>\n</ol>\n</li>\n<li>Item 3</li>\n</ol>\n<h5>Example 5</h5>\n<p>This is an example of a table:</p>\n<table>\n<thead>\n<tr>\n<th>Header 1</th>\n<th>Header 2</th>\n<th>Header 3</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Row 1</td>\n<td>Row 1</td>\n<td>Row 1</td>\n</tr>\n<tr>\n<td>Row 2</td>\n<td>Row 2</td>\n<td>Row 2</td>\n</tr>\n<tr>\n<td>Row 3</td>\n<td>Row 3</td>\n<td>Row 3</td>\n</tr>\n</tbody></table>\n<h6>Example 6</h6>\n<p>This is an example of a blockquote:</p>\n<blockquote>\n<p>This is a blockquote.</p>\n</blockquote>\n"
},
{
"id": "f7dea9a6-5b68-4d89-9646-e6642c36a27a",
"id": "3813af89-16e9-4532-afaa-7a7c4406c0fc",
"metadata": {
"published": true,
"title": "Test",
Expand All @@ -40,7 +40,7 @@
"html": "<h1>Test File</h1>\n<p>This is an test post.</p>\n<h2>Some Content</h2>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla blandit aliquam finibus. Sed venenatis placerat eros, eget pulvinar lacus elementum ut. In hac habitasse platea dictumst. Etiam sed erat quis odio vehicula consequat. Phasellus magna magna, dignissim at felis eu, pulvinar venenatis turpis. Sed molestie consectetur magna, eget aliquam erat fermentum at. Nam bibendum enim in quam consequat, ut ultricies orci pellentesque. Curabitur viverra, est efficitur cursus cursus, ante magna eleifend sapien, eget pellentesque eros erat sit amet ante. Integer volutpat hendrerit imperdiet. Nulla facilisi. Quisque laoreet sem dolor, sed porttitor turpis pulvinar quis.</p>\n<p>Nullam sodales scelerisque ornare. Integer sed lorem sed purus dignissim egestas. Mauris rhoncus tellus nisl, eu posuere diam hendrerit eu. Nulla scelerisque dolor lacus, ac vestibulum lacus tristique eget. Quisque tempor, lorem sed viverra tincidunt, eros velit efficitur neque, in iaculis ipsum libero eget nisl. Nunc a ipsum sed tellus volutpat accumsan. Duis sodales risus luctus velit iaculis pretium. Pellentesque tincidunt lobortis laoreet. Nam imperdiet, risus rutrum luctus consectetur, dui justo venenatis turpis, nec vestibulum tortor magna vel leo. Morbi blandit felis eget velit mollis, sagittis interdum velit porta. Vivamus tincidunt gravida facilisis. Integer condimentum, augue vel tristique tempor, lorem ipsum convallis mi, sit amet ultricies lectus nunc in orci. Pellentesque vel magna tellus.</p>\n<p>Cras ullamcorper felis vel nisi tempor commodo. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ac augue faucibus, fermentum nisl nec, fermentum massa. Proin sit amet venenatis ligula, at pulvinar velit. Nunc auctor metus in urna placerat euismod. Quisque blandit turpis lacus, posuere vehicula erat cursus vel. Donec faucibus, ex eget tempus egestas, nibh mauris pellentesque tortor, malesuada posuere lorem elit tristique quam. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ut neque eu tellus euismod volutpat. Pellentesque maximus est leo, id finibus enim vehicula in.</p>\n<p>Proin a enim at lorem maximus semper vel non mauris. Cras non pulvinar nunc. Proin tincidunt tempus purus, sed congue sem ultrices vel. Vestibulum justo justo, vestibulum nec scelerisque et, egestas eget felis. Sed pulvinar in massa vel tincidunt. Duis ac quam a diam gravida convallis. Nam dapibus velit a augue rhoncus, eu consectetur nulla efficitur. Aliquam vitae dolor imperdiet, ultricies ligula nec, euismod enim. Cras vehicula est vitae justo dignissim mattis. Praesent eleifend ullamcorper cursus.</p>\n<p>In eget rhoncus lacus. Maecenas semper iaculis pharetra. Duis auctor purus sed ligula viverra iaculis. Vivamus congue semper porta. Donec nec nunc vitae massa tempus rhoncus vel in orci. Curabitur sollicitudin enim sed elit semper maximus eu non purus. Nulla sagittis odio orci, non congue nulla faucibus ac. Nam vel pharetra turpis. Proin sed euismod tortor. Suspendisse auctor erat eu lectus vestibulum accumsan. Phasellus dictum condimentum ligula a ornare. Mauris condimentum malesuada nibh, commodo iaculis nisi dignissim et. Donec vestibulum turpis nibh, vitae dapibus dui gravida ac. Nam malesuada nulla nec ex congue rutrum. Integer non varius risus.</p>\n"
},
{
"id": "bf0b6fc8-07c6-458a-aa0c-e3b54f28001a",
"id": "f90955b3-d20c-4b99-9124-e75daa6a3bce",
"metadata": {
"published": true,
"title": "With Image",
Expand Down

0 comments on commit 1261209

Please sign in to comment.