Skip to content

Support multi-line tips and warns #690

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

Closed
wants to merge 1 commit into from

Conversation

linkeo
Copy link

@linkeo linkeo commented Nov 6, 2018

Add support for multi-line tips and warns. Implement for #689 .

I did not find a way to add custom block elements to marked, so I just modified helper function to reach the aim.

Changes:

  1. Because multiple lines may contain multiple paragraphs or other block elements, I changed container to div, and modified styles about it (and fix margin of the first or last child in the container).
  2. Use RegExp to remove !> or ?> at the beginning of every lines, then use a default marked to parse into html content.
  3. Add package "he" to decode html to markdown (inline elements will not be reverted to markdown, but it's equivalent to write inline elements in html form)

@QingWei-Li
Copy link
Member

Thanks Keo!

BUT I will refactor this feature in v5.0

ref #413

@QingWei-Li QingWei-Li closed this Nov 7, 2018
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

Successfully merging this pull request may close these issues.

2 participants