Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
377e9c68
Commit
377e9c68
authored
8 years ago
by
Martyn Gigg
Browse files
Options
Downloads
Patches
Plain Diff
Add link to source document in mantiddoc directives
Stop warnings/errors coming out with no source information.
parent
9db47a8f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/sphinxext/mantiddoc/directives/base.py
+8
-3
8 additions, 3 deletions
docs/sphinxext/mantiddoc/directives/base.py
with
8 additions
and
3 deletions
docs/sphinxext/mantiddoc/directives/base.py
+
8
−
3
View file @
377e9c68
...
@@ -73,9 +73,15 @@ class BaseDirective(Directive):
...
@@ -73,9 +73,15 @@ class BaseDirective(Directive):
"""
"""
Inserts the currently tracked rst lines into the state_machine
Inserts the currently tracked rst lines into the state_machine
"""
"""
self
.
state_machine
.
insert_input
(
self
.
rst_lines
,
""
)
self
.
state_machine
.
insert_input
(
self
.
rst_lines
,
self
.
source
()
)
self
.
rst_lines
=
[]
self
.
rst_lines
=
[]
def
source
(
self
):
"""
Returns the full path to the source document
"""
return
self
.
state
.
document
.
settings
.
env
.
docname
def
make_header
(
self
,
name
,
pagetitle
=
False
):
def
make_header
(
self
,
name
,
pagetitle
=
False
):
"""
"""
Makes a ReStructuredText title from the algorithm
'
s name.
Makes a ReStructuredText title from the algorithm
'
s name.
...
@@ -207,5 +213,4 @@ class AlgorithmBaseDirective(BaseDirective):
...
@@ -207,5 +213,4 @@ class AlgorithmBaseDirective(BaseDirective):
document. The expected name of the document is
"
AlgorithmName-v?
"
, which
document. The expected name of the document is
"
AlgorithmName-v?
"
, which
is the name of the file with the extension removed
is the name of the file with the extension removed
"""
"""
env
=
self
.
state
.
document
.
settings
.
env
(
self
.
algm_name
,
self
.
algm_version
)
=
algorithm_name_and_version
(
self
.
source
())
(
self
.
algm_name
,
self
.
algm_version
)
=
algorithm_name_and_version
(
env
.
docname
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment