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

Parse inline #1761

Merged
merged 9 commits into from
Sep 26, 2020
Merged

Parse inline #1761

merged 9 commits into from
Sep 26, 2020

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Sep 21, 2020

Marked version: v1.1.1

Description

Create a method (marked.parseInline()) that will parse only inline markdown. This is useful for parsing fragments of markdown that should only contain inline elements.

Example:

const marked = require('marked');
const blockHtml = marked('**strong** _em_');
console.log(blockHtml); // '<p><strong>strong</strong> <em>em</em></p>'
const inlineHtml = marked.parseInline('**strong** _em_');
console.log(inlineHtml); // '<strong>strong</strong> <em>em</em>'

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

@vercel
Copy link

vercel bot commented Sep 21, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/markedjs/markedjs/1tr3u4s2g
✅ Preview: https://markedjs-git-fork-uzitech-parseinline.markedjs.vercel.app

@UziTech
Copy link
Member Author

UziTech commented Sep 21, 2020

There should probably be more of an explanation in the documentation but I am not very good at writing documentation.

docs/INDEX.md Outdated Show resolved Hide resolved
docs/INDEX.md Outdated Show resolved Hide resolved
Co-authored-by: Steven <steven@ceriously.com>
@vercel vercel bot temporarily deployed to Preview September 21, 2020 14:57 Inactive
Co-authored-by: Steven <steven@ceriously.com>
@joshbruce joshbruce merged commit a25952f into markedjs:master Sep 26, 2020
@UziTech UziTech deleted the parseInline branch September 27, 2020 15:22
@UziTech UziTech mentioned this pull request Sep 27, 2020
12 tasks
@github-actions
Copy link

🎉 This PR is included in version 1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Provide a function to process inline markup only Surpress wrapping in <p> tag.
3 participants