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

Allow arrays in markdown template literal #410

Merged
merged 2 commits into from
Apr 27, 2018
Merged

Allow arrays in markdown template literal #410

merged 2 commits into from
Apr 27, 2018

Conversation

jstcki
Copy link
Contributor

@jstcki jstcki commented Apr 20, 2018

Concatenate arrays to output in markdown template literals instead of JSON-stringifying them. A better version would also handle the content of the array but this is fine as a small improvement.

Partially fixes #403

@jstcki
Copy link
Contributor Author

jstcki commented Apr 20, 2018

@Cethy, this allows you to do something like this:

markdown`
# Hello

${["foo", "bar"].map(x => [
  `## More markdown`,
  <div>{x}</div>
])}
`

@jstcki jstcki merged commit 9d58c3c into master Apr 27, 2018
@jstcki jstcki deleted the markdown-array branch April 27, 2018 07:22
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.

1 participant