Skip to content

Commit 3c20376

Browse files
authored
Merge pull request readthedocs#82 from readthedocs/humtos/send-path-qs
Send `path` instead of `docpath`
2 parents d819b51 + cc88869 commit 3c20376

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

hoverxref/_static/js/hoverxref.js_t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function getEmbedURL(project, version, doc, docpath, section) {
6060
'project': project,
6161
'version': version,
6262
'doc': doc,
63-
'docpath': docpath,
63+
'path': docpath,
6464
'section': section,
6565
}
6666
console.debug('Data: ' + JSON.stringify(params));

tests/test_htmltag.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import textwrap
23

34
from .utils import srcdir, prefixdocumentsrcdir, customobjectsrcdir, pythondomainsrcdir
45

@@ -65,6 +66,14 @@ def test_js_render(app, status, warning):
6566
"animationDuration: 0",
6667
"content: 'Loading...'",
6768
"var url = 'https://readthedocs.org' + '/api/v2/embed/?' + $.param(params);",
69+
textwrap.indent(textwrap.dedent("""
70+
var params = {
71+
'project': project,
72+
'version': version,
73+
'doc': doc,
74+
'path': docpath,
75+
'section': section,
76+
}"""), ' ').strip(),
6877
"var sphinxtabs = false",
6978
"var mathjax = false",
7079
]

0 commit comments

Comments
 (0)