Insert a link into bold text in reStructuredText

自闭症网瘾萝莉.ら 提交于 2019-12-03 22:37:55

At the moment it seems that this is not possible: see the Docutils FAQ, specifically the question "Is nested inline markup possible". The answer basically states that nested inline markup is on the to do list, so it will eventually be possible to do what you ask in the question, and provides a couple of work arounds (which they state are not recommended).

Since the workarounds are not recommended perhaps for the time being you could just do something like:

**Lorem ipsum dolor sit amet,** `consectetur <http://www.example.com>`_ 
**adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore 
magna aliqua.**

Of course your link would not be bold, but at least it will be a valid link.

One further workaround would be to mark the whole paragraph as bold, if applicable.

.. class:: bold

Lorem ipsum dolor sit amet, `consectetur <http://www.example.com>`_ 
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore 
magna aliqua.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!