Skip to content

Commit

Permalink
Revert "fix: space around block md ext"
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd authored Sep 18, 2024
1 parent 1ba1b7a commit 5575dc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/nuemark/src/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ export function parseBlocks(lines) {
// code line
if (fenced) return fenced.content.push(line)


// component
const trimmed = line.trim()
if (!comp && trimmed[0] == '[' && trimmed.slice(-1) == ']' && !line.includes('][')) {
comp = parseComponent(trimmed.slice(1, -1))
if (line[0] == '[' && line.slice(-1) == ']' && !line.includes('][')) {
comp = parseComponent(line.slice(1, -1))
blocks.push(comp)
md = null

Expand Down
4 changes: 2 additions & 2 deletions packages/nuemark/test/nuemark.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ test('[tabs] key and wrapper', () => {


const NESTED_TABS = `
[tabs "Foo | Bar"]
[tabs "Foo | Bar"]
First
---
Second
[tabs "Baz | Bruh" key="inner"]\t
[tabs "Baz | Bruh" key="inner"]
Inner 1
---
Inner 2
Expand Down

0 comments on commit 5575dc0

Please sign in to comment.