Skip to content
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
6 changes: 6 additions & 0 deletions packages/codehike/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# codehike

## 1.0.5

### Patch Changes

- [#499](https://github.com/code-hike/codehike/pull/499) [`360df6e`](https://github.com/code-hike/codehike/commit/360df6e84793bc106350693cabbe06efe170b2e8) Thanks [@pomber](https://github.com/pomber)! - Parse two values separated by a markdown break

## 1.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/codehike/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codehike",
"version": "1.0.4",
"version": "1.0.5",
"description": "Build rich content websites with Markdown and React",
"keywords": [
"react",
Expand Down
3 changes: 2 additions & 1 deletion packages/codehike/src/mdx/1.1.remark-list-to-section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ function isImageAndParagraphs(child: any): child is {
return (
(c.type === "image" && c.alt?.startsWith("!")) ||
(c.type === "text" && c.value.trim().startsWith("!")) ||
(c.type === "text" && c.value.trim() === "")
(c.type === "text" && c.value.trim() === "") ||
c.type === "break"
)
})
}
Expand Down
3 changes: 3 additions & 0 deletions packages/codehike/tests/md-suite/two-ps.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ cc
ee ee
ee

!k two-spaces-after-value
!l because-some-use-prettier-proseWrap

## !invalid

ff ff
Expand Down
8 changes: 8 additions & 0 deletions packages/codehike/tests/md-suite/two-ps.2.before-remark.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@
"type": "paragraph",
"children": [{ "type": "text", "value": "!e1 1\r\nee ee\r\nee" }]
},
{
"type": "paragraph",
"children": [
{ "type": "text", "value": "!k two-spaces-after-value" },
{ "type": "break" },
{ "type": "text", "value": "!l because-some-use-prettier-proseWrap" }
]
},
{
"type": "heading",
"depth": 2,
Expand Down
2 changes: 2 additions & 0 deletions packages/codehike/tests/md-suite/two-ps.8.parsed-jsx.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jjj
"2",
],
"e1": "1\r\nee ee\r\nee",
"k": "two-spaces-after-value",
"l": "because-some-use-prettier-proseWrap",
"title": "",
},
}