py2docfx 0.1.11.dev1981067__py3-none-any.whl → 0.1.11.dev1985872__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py +7 -0
- py2docfx/docfx_yaml/tests/test_writer_uri.py +4 -0
- py2docfx/docfx_yaml/writer.py +13 -1
- {py2docfx-0.1.11.dev1981067.dist-info → py2docfx-0.1.11.dev1985872.dist-info}/METADATA +1 -1
- {py2docfx-0.1.11.dev1981067.dist-info → py2docfx-0.1.11.dev1985872.dist-info}/RECORD +7 -7
- {py2docfx-0.1.11.dev1981067.dist-info → py2docfx-0.1.11.dev1985872.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.11.dev1981067.dist-info → py2docfx-0.1.11.dev1985872.dist-info}/top_level.txt +0 -0
@@ -20,6 +20,7 @@ def test_http_link_in_summary_should_not_nest_parenthesis(app):
|
|
20
20
|
class_summary_result = transform_node(app, doctree[1][1][0])
|
21
21
|
method1_summary_result = transform_node(app, doctree[1][1][2][1])
|
22
22
|
method2_summary_result = transform_node(app, doctree[1][1][4][1])
|
23
|
+
method3_summary_result = transform_node(app, doctree[1][1][6][1])
|
23
24
|
|
24
25
|
# Assert
|
25
26
|
# Shouldn't see something like [title]((link))
|
@@ -28,7 +29,10 @@ def test_http_link_in_summary_should_not_nest_parenthesis(app):
|
|
28
29
|
"We should not generate nested parenthesis causing docs validation warnings\n")
|
29
30
|
method2_summary_expected = ("\n\n This isn't a content issue link ([https://www.microsoft.com](https://www.microsoft.com))\n "
|
30
31
|
"Should expect a transformed Markdown link.\n")
|
32
|
+
method3_summary_expected = ("\n\n This is a bare URL that shouldn't be transformed into a link\n "
|
33
|
+
"because it's in the exclusion list: `https://management.azure.com`\n")
|
31
34
|
assert(class_summary_expected == class_summary_result)
|
32
35
|
assert(method1_summary_expected == method1_summary_result)
|
33
36
|
assert(method2_summary_expected == method2_summary_result)
|
37
|
+
assert(method3_summary_expected == method3_summary_result)
|
34
38
|
|
py2docfx/docfx_yaml/writer.py
CHANGED
@@ -184,6 +184,15 @@ class MarkdownTranslator(nodes.NodeVisitor):
|
|
184
184
|
sectionchars = '*=-~"+`'
|
185
185
|
xref_template = "<xref:{0}>"
|
186
186
|
|
187
|
+
# URLs that shouldn't be automatically rendered as hyperlinks if found bare. Included because they appear
|
188
|
+
# frequently, get flagged by the broken link validator and/or there's no value to the user in
|
189
|
+
# making them clickable links.
|
190
|
+
urls_that_shouldnt_be_rendered_as_links = {
|
191
|
+
"https://management.azure.com",
|
192
|
+
"https://management.chinacloudapi.cn",
|
193
|
+
"https://management.usgovcloudapi.net"
|
194
|
+
}
|
195
|
+
|
187
196
|
def __init__(self, document, builder):
|
188
197
|
self.invdata = []
|
189
198
|
nodes.NodeVisitor.__init__(self, document)
|
@@ -927,7 +936,10 @@ class MarkdownTranslator(nodes.NodeVisitor):
|
|
927
936
|
match_content_issue_pattern = True
|
928
937
|
ref_string = node.attributes["refuri"]
|
929
938
|
if not match_content_issue_pattern:
|
930
|
-
|
939
|
+
if inner_text == node.attributes['refuri'] and inner_text in cls.urls_that_shouldnt_be_rendered_as_links:
|
940
|
+
ref_string = f'`{inner_text}`'
|
941
|
+
else:
|
942
|
+
ref_string = '[{}]({})'.format(node.astext(), node.attributes['refuri'])
|
931
943
|
else:
|
932
944
|
# only use id in class and func refuri if its id exists
|
933
945
|
# otherwise, remove '.html#' in refuri
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: py2docfx
|
3
|
-
Version: 0.1.11.
|
3
|
+
Version: 0.1.11.dev1985872
|
4
4
|
Summary: A package built based on Sphinx which download source code package and generate yaml files supported by docfx.
|
5
5
|
Author: Microsoft Corporation
|
6
6
|
License: MIT License
|
@@ -75,7 +75,7 @@ py2docfx/docfx_yaml/settings.py,sha256=JQZNwFebczl-zn8Yk2taAGANRi-Hw8hywtDWxqXXF
|
|
75
75
|
py2docfx/docfx_yaml/translator.py,sha256=LSzNl4C-07bLbUZ5myfyWwh25cTNIIBih77Cp4tBWvo,25999
|
76
76
|
py2docfx/docfx_yaml/utils.py,sha256=m5jC_qP2NKqzUx_z0zgZ-HAmxQdNTpJYKkL_F9vGeII,1555
|
77
77
|
py2docfx/docfx_yaml/write_utils.py,sha256=q5qoYWw6GVDV8a3E8IxcSLWnN9sAer42VFRgadHBkgk,305
|
78
|
-
py2docfx/docfx_yaml/writer.py,sha256=
|
78
|
+
py2docfx/docfx_yaml/writer.py,sha256=c_3s3KLbKJWRaafQgSK7P_8rs42RjB4nSBj9Mi4yA9g,35972
|
79
79
|
py2docfx/docfx_yaml/yaml_builder.py,sha256=S3xty_ILxEUsw1J9VCwUkSLLYAUfQDm3fYbciv70gXc,2573
|
80
80
|
py2docfx/docfx_yaml/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
81
81
|
py2docfx/docfx_yaml/tests/conftest.py,sha256=CykkZxaDZ-3a1EIQdGBieSmHL9FdyTE2xTJZe9QgKcg,1214
|
@@ -91,7 +91,7 @@ py2docfx/docfx_yaml/tests/test_translator_numpy_returns.py,sha256=nmC70WUqCRcB1t
|
|
91
91
|
py2docfx/docfx_yaml/tests/test_translator_rst_returns.py,sha256=BL3nOMMTPzNPJk-P9oMANiXnJ7ocuiecbFHH4DU1n40,2942
|
92
92
|
py2docfx/docfx_yaml/tests/test_translator_signatures.py,sha256=DM51EOb4UXLkrO1-4cQQQvvX210goAsnxKJH-4A2U2Q,1537
|
93
93
|
py2docfx/docfx_yaml/tests/test_writer_table.py,sha256=UnGYXQ-QVxin_e-HGZAHdg1LSFV0qc480ZNsqPN9OYc,1444
|
94
|
-
py2docfx/docfx_yaml/tests/test_writer_uri.py,sha256=
|
94
|
+
py2docfx/docfx_yaml/tests/test_writer_uri.py,sha256=wwdxraB5wP88OIJzuLGviit44Kesb8dvU9ajb5Ra0qA,2093
|
95
95
|
py2docfx/docfx_yaml/tests/test_writer_versions.py,sha256=0-0VTMhbZ4ml9ryu1gYnu0mM2yIEKsBuFYb2F6grzTE,2995
|
96
96
|
py2docfx/docfx_yaml/tests/roots/test-build-finished/code_with_signature_and_docstring.py,sha256=qvcKWL68C2aDTP8JT022nMV4EdZ50vhxVshMrHVO2sY,449
|
97
97
|
py2docfx/docfx_yaml/tests/roots/test-build-finished/conf.py,sha256=L8vIFmO546PCQks50Gif_uTBwC3cppohXrQaogfyRF8,410
|
@@ -123,7 +123,7 @@ py2docfx/docfx_yaml/tests/roots/test-translator-signatures/conf.py,sha256=avcbnI
|
|
123
123
|
py2docfx/docfx_yaml/tests/roots/test-translator-signatures/refered_objects.py,sha256=DJaX52mnHw9W3GSqKh75CYK87g4CczXNNjFO496Ai2U,79
|
124
124
|
py2docfx/docfx_yaml/tests/roots/test-writer-table/code_with_table_desc.py,sha256=J4eFvXsymgFvjnwVUY0APtUGwuxvt-AFJjTaEaQ7zMQ,574
|
125
125
|
py2docfx/docfx_yaml/tests/roots/test-writer-table/conf.py,sha256=avcbnIOV2mlGQwhMQJZC4W6UGRBRhnq1QBxjPWlySxQ,260
|
126
|
-
py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py,sha256=
|
126
|
+
py2docfx/docfx_yaml/tests/roots/test-writer-uri/code_with_uri.py,sha256=GSz1B0xiXSaddkrniVBXzW7R4jDuPq1sWU7ByBH6MxA,754
|
127
127
|
py2docfx/docfx_yaml/tests/roots/test-writer-uri/conf.py,sha256=avcbnIOV2mlGQwhMQJZC4W6UGRBRhnq1QBxjPWlySxQ,260
|
128
128
|
py2docfx/docfx_yaml/tests/roots/test-writer-versions/code_with_version_directives.py,sha256=UuizbrJPaG_PcaH18BvbI9KQevOaLd4SslpnzMSqcrE,1030
|
129
129
|
py2docfx/docfx_yaml/tests/roots/test-writer-versions/conf.py,sha256=SCEKrm9VigArfdgf-GAieJD-40d0ctT6urmGIjFOZLM,404
|
@@ -4193,7 +4193,7 @@ py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtas
|
|
4193
4193
|
py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_localsystem.py,sha256=08ojAS48W6RLsUbRD45j0SJhg_Y2NFHZT6qjT4Vrig0,75
|
4194
4194
|
py2docfx/venv/venv1/Scripts/pywin32_postinstall.py,sha256=u95n7QQUxpCjrZistYE-3gN451zXzopuJna8cXRQ4Jw,28115
|
4195
4195
|
py2docfx/venv/venv1/Scripts/pywin32_testall.py,sha256=-6yvZmd2lPQc4e8i6PgLsr_totF6mScvoq0Jqr0V2fM,3844
|
4196
|
-
py2docfx-0.1.11.
|
4197
|
-
py2docfx-0.1.11.
|
4198
|
-
py2docfx-0.1.11.
|
4199
|
-
py2docfx-0.1.11.
|
4196
|
+
py2docfx-0.1.11.dev1985872.dist-info/METADATA,sha256=ziCJxrpypgAoRNQ4yWOhi3ei4y1bJNcCF54DSFVkWQw,601
|
4197
|
+
py2docfx-0.1.11.dev1985872.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
4198
|
+
py2docfx-0.1.11.dev1985872.dist-info/top_level.txt,sha256=5dH2uP81dczt_qQJ38wiZ-gzoVWasfiJALWRSjdbnYU,9
|
4199
|
+
py2docfx-0.1.11.dev1985872.dist-info/RECORD,,
|
File without changes
|
File without changes
|