Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paragraphs are erroneously split into multiple steps #26

Closed
washtubs opened this issue Dec 22, 2024 · 3 comments
Closed

Paragraphs are erroneously split into multiple steps #26

washtubs opened this issue Dec 22, 2024 · 3 comments

Comments

@washtubs
Copy link

washtubs commented Dec 22, 2024

According to the spec: "Each paragraph in your recipe file is a cooking step. Separate steps with an empty line."

It provides the following as an example:

A step,
the same step.

A different step.

Pasting that text in the playground, I expect to see 2 steps but instead see 3:

screenshot_249

I also see this behavior in the plugin and CLI, so I figure this is the right place to post it. Not sure if this is where the bug is though.

To throw my 2c in pre-emptively, the spec is wise on this IMHO. A good markup language allows for semantic line feeds, essentially allowing the user to break elements down into atomic thoughts being their own lines which is great for editing and making git history easier to interpret, without effecting the presentation.

EDIT:

I should add my cooklang obsidian version is 0.3.0.

And for cooklangcli version I tried both the main branch and 0.8.0, but looking at it again it looks like neither are using the latest version of this crate which is 0.9

@Zheoni
Copy link
Contributor

Zheoni commented Dec 22, 2024

Each paragraph in your recipe file is a cooking step. Separate steps with an empty line.

This has been added to the spec recently.

This parser has supported it since the beginning but only in the last version it has been enabled by default. So any aplications that have not been updated in the last couple of weeks will probably use old way of breaking the recipe into steps.

Also, I'm pretty sure neither that playground nor the obsidian plugin use the rust parser.

@Zheoni Zheoni closed this as completed Dec 22, 2024
@dubadub
Copy link
Contributor

dubadub commented Dec 22, 2024

Yep, just wanted to confirm that the playground you mentioned is based of cooklang-ts parser which is (slowly) being migrated to use wasm cooklang/cooklang-ts#27. You can use other playground https://cooklang.github.io/cooklang-rs/ based on rust parser.

@washtubs
Copy link
Author

OK, I was using the playground that was linked from the spec README fyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants