Re: reST->HTML: internal anchors: problem casting section names to IDs
Tom Roche <[email protected]>
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
one more mistake to correct :-( > Tom Roche[1] > >> Small reST document[2] has sections with unique names. When I use docutils/restview to convert it to HTML, all but one section id is created by (speaking `sed`ishly) `s/ /-/g`. However *one* section id is "hashed" (i.e., created like a backref), which breaks an explicit internal anchor. - Marc 'BlackJack' Rintsch[3] + Günter Milde[3] > > Here is the problem: you define an external target with the URL "#long-term-bodywear" (which happens to point to the same document) therefore also: "reference-external". > Doh! Thanks for clarifying. I had assumed all links were created in the same way. > > The following works here as expected:: > > .. howto style a link (e.g., make it italic): see http://docutils.sourcefor > > .. |long-term bodywear| replace:: *long-term bodywear* > > .. |short-term bodywear| replace:: *short-term bodywear* > > short-term bodywear > > ------------------- > > *see also* |long-term bodywear|_ > > long-term bodywear > > ------------------ > > *see also* |short-term bodywear|_ > ... and that renders correctly locally via `restview` and remotely via Bitbucket[4]. > thanks again, Tom Roche <[email protected]> > [1]: https://sourceforge.net/p/docutils/mailman/message/34982519/ > [2]: flawed version @ https://bitbucket.org/!api/2.0/snippets/tlroche/LR9oL/9277baf6d61904d1725c39dae4df8b7550192ebc/files/problematic_naming_of_internal_anchors.rst > [3]: https://sourceforge.net/p/docutils/mailman/message/34984893/ > [4]: fixed version @ https://bitbucket.org/!api/2.0/snippets/tlroche/LR9oL/HEAD/files/problematic_naming_of_internal_anchors.rst ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 _______________________________________________ Docutils-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list.