From 45895b561f36afc0bdb2a04765f638e91a199635 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 13 Jan 2013 23:00:05 -0800 Subject: RST writer: Fixes bug with links with duplicate text. We now (a) use anonymous links for links with inline URLs, and (b) use an inline link instead of a reference link if the reference link would require a label that has already been used for a different link. Closes #511. --- tests/writer.rst | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'tests') diff --git a/tests/writer.rst b/tests/writer.rst index 399600ac0..41da5bc73 100644 --- a/tests/writer.rst +++ b/tests/writer.rst @@ -18,8 +18,8 @@ markdown test suite. Headers ======= -Level 2 with an `embedded link `_ ---------------------------------------- +Level 2 with an `embedded link `__ +---------------------------------------- Level 3 with *emphasis* ~~~~~~~~~~~~~~~~~~~~~~~ @@ -549,7 +549,7 @@ This is *emphasized*, and so *is this*. This is **strong**, and so **is this**. -An *`emphasized link `_*. +An *`emphasized link `__*. ***This is strong and em.*** @@ -584,7 +584,7 @@ Smart quotes, ellipses, dashes ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted ‘``code``’ and a “`quoted -link `_”. +link `__”. Some dashes: one—two — three—four — five. @@ -690,42 +690,42 @@ Links Explicit -------- -Just a `URL `_. +Just a `URL `__. -`URL and title `_. +`URL and title `__. -`URL and title `_. +`URL and title `__. -`URL and title `_. +`URL and title `__. -`URL and title `_ +`URL and title `__ -`URL and title `_ +`URL and title `__ -`with\_underscore `_ +`with\_underscore `__ -`Email link `_ +`Email link `__ -`Empty <>`_. +`Empty <>`__. Reference --------- -Foo `bar `_. +Foo `bar `__. -Foo `bar `_. +Foo `bar `__. -Foo `bar `_. +Foo `bar `__. -With `embedded [brackets] `_. +With `embedded [brackets] `__. -`b `_ by itself should be a link. +`b `__ by itself should be a link. -Indented `once `_. +Indented `once `__. -Indented `twice `_. +Indented `twice `__. -Indented `thrice `_. +Indented `thrice `__. This should [not][] be a link. @@ -733,21 +733,21 @@ This should [not][] be a link. [not]: /url -Foo `bar `_. +Foo `bar `__. -Foo `biz `_. +Foo `biz `__. With ampersands --------------- Here’s a `link with an ampersand in the -URL `_. +URL `__. -Here’s a link with an amersand in the link text: `AT&T `_. +Here’s a link with an amersand in the link text: `AT&T `__. -Here’s an `inline link `_. +Here’s an `inline link `__. -Here’s an `inline link in pointy braces `_. +Here’s an `inline link in pointy braces `__. Autolinks --------- @@ -815,7 +815,7 @@ This paragraph should not be part of the note, as it is not indented. .. [3] This is *easier* to type. Inline notes may contain - `links `_ and ``]`` verbatim characters, as well as + `links `__ and ``]`` verbatim characters, as well as [bracketed text]. .. [4] -- cgit v1.2.3