Commits

ezio.melotti  committed c5288b8

Add linkification for the devguide.

  • Participants
  • Parent commits ee14d1e

Comments (0)

Files changed (2)

File extensions/local_replace.py

     # PEP 8, PEP8, PEP 0008, ...
     (re.compile(r'PEP\s*(\d{1,4})\b', re.I),
      make_pep_link),
+
+    # devguide
+    (re.compile(r'(?<!/)(devguide(?:/\w+(?:.html)?(?:#[\w-]+)?)?)'),
+     r'<a href="http://docs.python.org/\1">\1</a>'),
 ]
 
 

File extensions/test/local_replace_data.txt

 see PEP 15000
 write a PEP!
 write a PEP!
+##
+##
+see the devguide.
+see the <a href="http://docs.python.org/devguide">devguide</a>.
+see http://docs.python.org/devguide/.
+see <a href="http://docs.python.org/devguide/.">http://docs.python.org/devguide/.</a>
+see devguide/triaging.
+see <a href="http://docs.python.org/devguide/triaging">devguide/triaging</a>.
+see devguide/triaging.html.
+see <a href="http://docs.python.org/devguide/triaging.html">devguide/triaging.html</a>.
+see http://docs.python.org/devguide/committing.html#using-several-working-copies
+see <a href="http://docs.python.org/devguide/committing.html#using-several-working-copies">http://docs.python.org/devguide/committing.html#using-several-working-copies</a>
+see devguide/committing.html#using-several-working-copies
+see <a href="http://docs.python.org/devguide/committing.html#using-several-working-copies">devguide/committing.html#using-several-working-copies</a>
+see devguide/committing#using-several-working-copies
+see <a href="http://docs.python.org/devguide/committing#using-several-working-copies">devguide/committing#using-several-working-copies</a>