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

CRLF is not supported when parsing frontmatter #41

Closed
kebuAAA opened this issue Sep 13, 2022 · 5 comments
Closed

CRLF is not supported when parsing frontmatter #41

kebuAAA opened this issue Sep 13, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@kebuAAA
Copy link

kebuAAA commented Sep 13, 2022

I have read the guide but I still don't know where I should put my frontmatter. I try to put it in my markdown files but it seems not to work, Can you tell me how to configure the settings in detail? I really need this amazing extension!

@gera2ld
Copy link
Member

gera2ld commented Sep 14, 2022

Either add this to the beginning of your Markdown file (note the markmap: namespace):

---
markmap:
  colorFreezeLevel: 2
---

Or this to the Default Options of your extension settings:

{
  "colorFreezeLevel": 2
}

For example this is what I got with README.md of this repo:

image

Please let me know if you think the doc is not clear enough.

@gera2ld gera2ld closed this as completed Sep 14, 2022
@kebuAAA
Copy link
Author

kebuAAA commented Sep 15, 2022

I have done as what you said just now. The following code is in my md file.

---
markmap:
    colorFreezeLevel: 3
    initialExpandLevel: 1
---

# markmap

## Links

- <https://markmap.js.org/>
- [GitHub](https://github.com/gera2ld/markmap)

## Related Projects

- [coc-markmap](https://github.com/gera2ld/coc-markmap)
- [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)

## Features

- links
- **strong** ~~del~~ *italic* ==highlight==
- multiline
  text
- `inline code`
-
    ```js
    console.log('code block');
    ```
- Katex
  - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
  - [More Katex Examples](#?d=gist:af76a4c245b302206b16aec503dbe07b:katex.md)
- Now we can wrap very very very very long text based on `maxWidth` option

I don't think the final result is what I want (In my opinion, the frontmatter doesn't work as I expect):
image
I feel very sorry for my ignorance:cry:.

@gera2ld
Copy link
Member

gera2ld commented Sep 15, 2022

I guess your end of line sequence is CRLF? Only LF is supported at the moment, let me fix this.

@gera2ld gera2ld reopened this Sep 15, 2022
@gera2ld gera2ld added the bug Something isn't working label Sep 15, 2022
@gera2ld gera2ld changed the title Where should I put my frontmatter CRLF is not supported when parsing frontmatter Sep 15, 2022
@kebuAAA
Copy link
Author

kebuAAA commented Sep 15, 2022

I guess your end of line sequence is CRLF? Only LF is supported at the moment, let me fix this.

Yeah, you are right, I change the end of line sequence and now the extension works well. Thank you very much.

@fanlushuai
Copy link

It's time to release @gera2ld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants