Skip to content

Conversation

minddust
Copy link
Contributor

noticed this strange behavior here:

http://www.django-rest-framework.org/topics/3.0-announcement/#the-data-and-query_params-properties

so here is a failing testcase.

data

# This is `code` and `this` too.

genetated

<h1 id="this-is-code-and-this-too"><code>this</code> too.<a class="toclink" href="#this-is-code-and-this-too">This is <code>code</code> and </a></h1>

expected

<h1 id="this-is-code-and-this-too"><a class="toclink" href="#this-is-code-and-this-too">This is <code>code</code> and <code>this</code> too.</a></h1>

@waylan
Copy link
Member

waylan commented Mar 17, 2016

Thanks for the report (and clear test case). I'm curious if this problem persists if you use the permalink config option rather than anchorlink (as documented here).

@minddust
Copy link
Contributor Author

permalink is looking good

@minddust
Copy link
Contributor Author

single inline code is also ok.

2+ inline code + anchor makes the trouble

mitya57 added a commit that referenced this pull request Mar 17, 2016
Removing items while iterating can result in wrong behavior. Refs #461.
@mitya57
Copy link
Collaborator

mitya57 commented Mar 17, 2016

I have pushed a fix for this to toc_bug branch. If @waylan is OK with the fix, I can merge it to master.

@waylan waylan mentioned this pull request Mar 17, 2016
@waylan waylan closed this in #462 Mar 17, 2016
@waylan
Copy link
Member

waylan commented Mar 17, 2016

I suspected it was something simple like that. @mitya57 your fix makes sense to me.

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.

3 participants