Skip to content

Commit

Permalink
Merge pull request ipython#3576 from damianavila/header_markdown
Browse files Browse the repository at this point in the history
Added support for markdown in heading cells when they are nbconverted.
  • Loading branch information
Carreau committed Jul 9, 2013
2 parents ccf0586 + 69daf98 commit 9eec2bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion IPython/nbconvert/templates/basichtml.tpl
Expand Up @@ -62,7 +62,7 @@ Out[{{cell.prompt_number}}]:
<h{{cell.level}}>
{% set source = cell.source | replace(' ','_') %}
<a class="heading-anchor" id="{{source}}" href="#{{source}}">
{{cell.source}}
{{cell.source | markdown| rm_fake}}
</a>
</h{{cell.level}}>
</div>
Expand Down
2 changes: 1 addition & 1 deletion IPython/nbconvert/templates/markdown.tpl
Expand Up @@ -61,7 +61,7 @@ $$

{% block headingcell scoped %}

{{ '#' * cell.level }} {{ cell.source}}
{{ '#' * cell.level }} {{ cell.source }}

{% endblock headingcell %}

Expand Down
2 changes: 1 addition & 1 deletion IPython/nbconvert/templates/rst.tpl
Expand Up @@ -64,7 +64,7 @@ Out[{{cell.prompt_number}}]:{% endif %}{% endblock output_prompt %}

{% block headingcell scoped %}
{%- set len = cell.source|length -%}
{{ cell.source}}
{{ cell.source | markdown2rst }}
{% if cell.level == 1 %}
{{- '=' * len }}
{%- elif cell.level == 2 %}
Expand Down

0 comments on commit 9eec2bb

Please sign in to comment.