mdbook-typst
mdbook-typst copied to clipboard
Error when title follow a quote
I have spotted an error when you have a title after a quote in your md file. For example:
# Chapter 1
testing
# Chapter 2
a quote below
> this is a quote
# Chapter 3
testing again.
Will be transformed into typst file:
= Chapter 1
#par()[testing ]
== Chapter 2
#par()[a quote below]
#quote(block: true, quotes: auto,)[#par()[this is a quote]
]== Chapter 3
#par()[testing again.]
#pagebreak(weak: true)
#pagebreak(weak: true)
The error appears at chapter 3, there should not be that extra ]
Just noticed that the heading levels are not respected as well ! ;-)
I see the problem:
=== Section 1
#par()[Test]
#align(center, line(length: 60%))
#par()[This is a quote below with other text below]
#quote(block: true, quotes: auto,)[#par()[A nice quote my firend]
]#par()[And another line that is not a quote]
=== Section 2
#par()[Test with a quote below: ]
#quote(block: true, quotes: auto,)[#par()[this is a quote]
]== Chapter 2
#par()[Test]
#align(center, line(length: 60%))
#par()[Test]
#pagebreak(weak: true)
#pagebreak(weak: true)
The quote bracket doesn't close the line properly, but only appear on the next line. This creates a problem if there is a title following...
Just noticed that the heading levels are not respected as well ! ;-)
It seems that this error comes from having two first level heading in a single markdown file. This seems to contradict the mdbook structure. So I won't attend to fix it ;-)
This should be fixed in v0.1.7. Let me know if it is not!