Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e75daca

Browse filesBrowse files
committed
fixed the windows path in rc_role
1 parent d4f1f8d commit e75daca
Copy full SHA for e75daca

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎doc/sphinxext/custom_roles.py

Copy file name to clipboardExpand all lines: doc/sphinxext/custom_roles.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from docutils import nodes
2+
from os.path import sep
23

34

45
def rcparam_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
56
rendered = nodes.Text('rcParams["{}"]'.format(text))
67

7-
rel_source = inliner.document.attributes['source'].split('/doc/', 1)[1]
8+
source = inliner.document.attributes['source'].replace(sep, '/')
9+
rel_source = source.split('/doc/', 1)[1]
10+
811
levels = rel_source.count('/')
912
refuri = ('../' * levels +
1013
'tutorials/introductory/customizing.html#matplotlib-rcparams')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.