Answers.Body: <p>Have a look at the <a href="https://github.com/pixelandtonic/Parsedown" rel="noreferrer">Parsedown</a> plugin by P&amp;T, it provides a line mode to not output any wrapping <code>&lt;p&gt;</code> tags.</p>
  
  <pre><code>{{ entry.title|parsedown('line') }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T15:44:24.953Z
Answers.LastActivityDate: 2016-04-21T15:44:24.953Z
Answers.UserDisplayName: carlcs
Answers.Body: <p>If you're here looking for a Craft 3 answer, the <a href="https://wordsmith.docs.topshelfcraft.com/guide/markdown.html#markdown" rel="noreferrer">Wordsmith plugin</a> offers the same ability to only parse inline and not include paragraph tags:</p>
  
  <pre><code>{{ entry.title|markdown(inlineOnly=true) }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-13T14:27:21.133Z
Answers.Text: As of Craft 3.5, the inlineOnly directive works with core too
Answers.UserDisplayName: Urs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-19T06:51:11.643Z
Answers.LastActivityDate: 2019-02-19T06:51:11.643Z
Answers.UserDisplayName: Matt Stein
Body: <p>Is there a way to parse a line of Markdown within Twig – without the surrounding 
  <code>&lt;p&gt;</code> tags?</p>
  
  <p>I see there is a StringHelper method called <a href="https://craftcms.com/classreference/helpers/StringHelper#parseMarkdownLine-detail" rel="noreferrer">ParseMarkdownLine</a> that does exactly what I'd like, but I haven't found a way to invoke it in my templates.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-21T11:50:41.473Z
Comments.Text: `{{ item | markdown | replace('<p>','') | replace('</p>','') | raw }}` works for a single line, but it does not feel right.
Comments.UserDisplayName: Avant la lettre
Tags: <templating><markup><markdown>
Title: Parse a line of Markdown, without <p>
ThreadText: # Parse a line of Markdown, without <p>
  
  (Asked by: username_0 on 2016-04-21)
  
  Is there a way to parse a line of Markdown within Twig – without the surrounding
  `<p>` tags?
  
  I see there is a StringHelper method called [ParseMarkdownLine](https://craftcms.com/classreference/helpers/StringHelper#parseMarkdownLine-detail) that does exactly what I'd like, but I haven't found a way to invoke it in my templates.
  
  **Tags:** templating, markup, markdown
  
  > **Comments:**
  > **username_0**: `{{ item | markdown | replace('<p>','') | replace('</p>','') | raw }}` works for a single line, but it does not feel right.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-02-19. Score: 6 | Accepted answer
  
  If you're here looking for a Craft 3 answer, the [Wordsmith plugin](https://wordsmith.docs.topshelfcraft.com/guide/markdown.html#markdown) offers the same ability to only parse inline and not include paragraph tags:
  
  ```
  {{ entry.title|markdown(inlineOnly=true) }}
  
  ```
  
  > **Comments:**
  > **username_3**: As of Craft 3.5, the inlineOnly directive works with core too  
  
  ---
  
  ### Answer by username_1 on 2016-04-21. Score: 6
  
  Have a look at the [Parsedown](https://github.com/pixelandtonic/Parsedown) plugin by P&T, it provides a line mode to not output any wrapping `<p>` tags.
  
  ```
  {{ entry.title|parsedown('line') }}
  
  ```
  
  
  ---
  
  