-
Notifications
You must be signed in to change notification settings - Fork 84
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
Spurious irefs added after section when abbrev links to heading #203
Comments
@cabo If you are back at work, can you please have a look at this issue. Thanks! |
Unfortunately, code elements (backticks) are protected from the *[...] support that kramdown provides. Looking at the other part of the report now; I'm not sure yet I understand what you expect to see. |
You can work around the protection afforded by backticks by manually adding the
|
Corresponding to line 94 to 96 in the markdown: In line 105 of the XML, the following
That is exactly what I am doing in my actual draft. Just makes the text unmarkdownish! |
Please try 1.6.42 for the weird shift-around. I'll continue to look for ways to get code spans into autolink/iref, but I'm not optimistic. |
Unfortunately, its not fixed. New output on the same markdown My understanding is than an |
So you don't want the functionality of |
What does |
It essentially suppresses auto-irefs inside the section that is also auto-linked (the |
Interesting... you really ought to document that! It did not occur to me to put Accept-Events in another section to test. |
Absolutely, and I'll keep this ticket open until that is done. |
In that case, I would need your help finding some kind of hack. I am defining a field called "Events", which I am wrapping in What I would like to do is this, but it does not work:
What I have tried is to use
None of these have worked! Any ideas? (I am happy to take this discussion elsewhere if you feel it is not appropriate here) |
The abbrev feature of upstream kramdown does not mix well with entity references. If you actually type out the zwsp (or any other character), it works. Of course, with many editors these native zwsps are hard to see in the manuscript, and they get in the way in the HTML form (copy/paste gets them, searches don't always work, etc.). So I'm thinking of providing a way to designate certain Unicode characters as to be suppressed in the output, so you can use them for such a purpose and remove them from the final XML. So then you would
and declare:
in the YAML header so the ⁜ is not actually shown after processing. Feedback welcome... (I'm also still thinking about a way to have abbrevs reach into backticks, but my simple prototype for this doesn't work yet.) |
IMHO, the cleanest way to solve this would be to preserve Kramown's abbreviation feature. So then you could do:
or even
I don't know if this is feasible to implement. Also, this would be a breaking change, but it could be possibly be implemented under a flag! It also circumvents the backticks problem. What do you think? |
Experimental feature:
Any text added to an abbrev definition beyond what is already allowed now Known bugs: Combining the |
Just tested it out. This is AWESOME! Thank you so much for fixing these issues. Much Appreciated!!!!!!! |
I have added documentation for the flag in the Syntax2 wiki. Once you finish, I will add the experimental part as well. |
This is a complicated one to explain. Please see the attached test case. When the
*[Accept-Events]:
abbrev links to#foo
(L94), an id attached to a section heading, a spurious<iref>
of a previously defined definition is introduced after the section heading Foo. Replace the#foo
with an inline id, say#a-e
(at the end of the previous para), the<iref>
vanishes.Further, instances of
Accept-Events
are not wrapped unlike other definitions. Again, this is remedied if the id is changed from#foo
to#a-e
.Original:
draft-gupta-httpbis-per-resource-events-test-2.md
Output:
draft-gupta-httpbis-per-resource-events-test-2.xml.txt
Also, it seems the conversion wraps code elements (inside backticks) are wrapped with
<spanx>
and not<tt>
even with-3
flag. Thus, the engine does not replace anyAccept-Event
instances that are wrapped in back ticks (even when linking to a non-heading id).Actual output
<spanx style="verb">Accept-Events</spanx>
Desired output
<tt><iref item="Accept-Events"/><xref format="none" target="a-e">Accept-Events</xref></tt>
The text was updated successfully, but these errors were encountered: