Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Italicize text containing a link

Tags:

I have an RST where I want an italicized link. However, the markup

*Warning: `Watch this <http://www.youtube.com/watch?v=dQw4w9WgXcQ&ob=av3e>`_!*

renders in HTML as

<em>Warning: `Watch this <http://www.youtube.com/watch?v=dQw4w9WgXcQ&ob=av3e>`_!</em>

That is, the italics render but the link doesn't. How do I get italics around the link?

like image 935
Trevor Burnham Avatar asked May 19 '12 21:05

Trevor Burnham


People also ask

Do you italicize links?

Note, however, that a website's address should not be confused with its title. In MLA style, you should use the title of a website as it appears on the site and italicize it as you would any independent work.

How do you italicize links in HTML?

To italicize the text in HTML, use either the em tag or the i (italics) tag. Both of these tags will italicize the text, but the em tag additionally indicates that the text has stress emphasis when read. You can also italicize text with the CSS font-style property set to “italic.”

How do you make text italic?

To make text italic, select and highlight the text first. Then hold down Ctrl (the control key) on the keyboard and then press the I on the keyboard.


1 Answers

The problem is that reST markup cannot be nested.

I managed to get it work with this:

Warning: |text|_

.. _text: http://www.youtube.com/watch?v=dQw4w9WgXcQ&ob=av3e

.. |text| replace:: *Watch this*
like image 97
Martin Ueding Avatar answered Oct 01 '22 14:10

Martin Ueding