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

Add support for basic description/definition lists #55

Merged
merged 4 commits into from
Jan 18, 2018
Merged

Add support for basic description/definition lists #55

merged 4 commits into from
Jan 18, 2018

Conversation

hisaac
Copy link
Contributor

@hisaac hisaac commented Dec 31, 2017

I find myself using descriptions lists, so I've added support for them in my Hexo setup, and want to offer it here to be included in the main repo. This will turn a PHP Markdown style definition list into the correct definition list html.

So this Markdown:

Definition Term
:    This is the definition for the term

Will generate this html:

<dl>
  <dt>Definition Term</dt>
  <dd>This is the definition for the term</dd>
</dl>

There is a limitation in the <dd>. This only supports single definitions. The above Markdown will work, but this will not:

Definition Term
:    Definition 1
:    Definition 2

That Markdown will generate this html:

<dl>
  <dt>Definition Term<br>: Definition 1</dt>
  <dd>Definition 2</dd>
</dl>

If you've got ideas on how to support multiple definitions, I'd love to add that.

@coveralls
Copy link

coveralls commented Dec 31, 2017

Coverage Status

Coverage increased (+1.4%) to 88.679% when pulling ab96602 on hisaac:master into 291b47a on hexojs:master.

@coveralls
Copy link

coveralls commented Dec 31, 2017

Coverage Status

Coverage increased (+1.9%) to 89.091% when pulling 03c790f on hisaac:master into 291b47a on hexojs:master.

@NoahDragon
Copy link
Member

NoahDragon commented Jan 17, 2018

Thanks for the sharing. Really cool feature. Could you please also update the Readme file to reflect this change?

@hisaac
Copy link
Contributor Author

hisaac commented Jan 18, 2018

Definitely. Documentation is important. Let me know what you think of the additions I made.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 89.091% when pulling bd87b06 on hisaac:master into 291b47a on hexojs:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 89.091% when pulling bd87b06 on hisaac:master into 291b47a on hexojs:master.

@NoahDragon
Copy link
Member

Great job. Thank you!

@NoahDragon NoahDragon merged commit 26bc183 into hexojs:master Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants