Skip to content

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