specitems 1.7.2__tar.gz → 1.7.4__tar.gz
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.
- {specitems-1.7.2 → specitems-1.7.4}/PKG-INFO +1 -1
- {specitems-1.7.2 → specitems-1.7.4}/pyproject.toml +1 -1
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/cite.py +18 -4
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/contentcommonmark.py +3 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/spec.pickle +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/README.md +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/__init__.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/clangformat.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/clihash.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/clipickle.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/clispecdoc.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/clitypeview.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/cliutil.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/cliverify.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/cliyamlquery.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/content.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/contentmarkdown.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/contentsphinx.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/contenttext.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/copyrights.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/getvaluesubprocess.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/glossary.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/hashutil.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/itemmapper.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/items.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/licenseinfo.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/py.typed +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/spdx.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/specconfig.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/specdoc.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/specformatter.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/specverify.py +0 -0
- {specitems-1.7.2 → specitems-1.7.4}/src/specitems/subprocessaction.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: specitems
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.4
|
|
4
4
|
Summary: Provides interfaces to work with specification items.
|
|
5
5
|
Keywords: certification,documentation,markdown,qualification,requirements-management,traceability
|
|
6
6
|
Author: The specitems Authors
|
|
@@ -84,6 +84,9 @@ class ReferenceTarget:
|
|
|
84
84
|
#: The path of the area relative to the base URL of the work.
|
|
85
85
|
path: str
|
|
86
86
|
|
|
87
|
+
#: The anchor of the area within the page of the work.
|
|
88
|
+
anchor: Optional[str]
|
|
89
|
+
|
|
87
90
|
#: The URL of the area. The caller substitutes it in the context of the
|
|
88
91
|
#: work.
|
|
89
92
|
url: Optional[str]
|
|
@@ -109,7 +112,10 @@ def get_reference_target(item: Item,
|
|
|
109
112
|
|
|
110
113
|
The attributes of the optional reference link take precedence over the
|
|
111
114
|
attributes of the reference location. The paths of the reference location
|
|
112
|
-
and the reference link are concatenated.
|
|
115
|
+
and the reference link are concatenated. The anchor comes from the first
|
|
116
|
+
of the reference link and the reference location which has an anchor or a
|
|
117
|
+
label. An anchor attribute gives the anchor, otherwise the label yields
|
|
118
|
+
it.
|
|
113
119
|
"""
|
|
114
120
|
work = get_reference_work(item)
|
|
115
121
|
link_data = {} if link is None else link.data
|
|
@@ -118,12 +124,20 @@ def get_reference_target(item: Item,
|
|
|
118
124
|
label = link_data.get("label", area.get("label"))
|
|
119
125
|
location = link_data.get("location", area.get("location"))
|
|
120
126
|
path = f"{area.get('path', '')}{link_data.get('path', '')}"
|
|
127
|
+
anchor: Optional[str] = None
|
|
128
|
+
for data in (link_data, area):
|
|
129
|
+
if "anchor" in data:
|
|
130
|
+
anchor = data["anchor"]
|
|
131
|
+
break
|
|
132
|
+
if "label" in data:
|
|
133
|
+
anchor = make_anchor(data["label"])
|
|
134
|
+
break
|
|
121
135
|
base = work.get("work-base-url")
|
|
122
136
|
url: Optional[str] = None
|
|
123
137
|
if base is not None:
|
|
124
|
-
|
|
125
|
-
url = f"{base}{path}{
|
|
126
|
-
return ReferenceTarget(work, name, label, location, path, url)
|
|
138
|
+
fragment = "" if anchor is None else f"#{anchor}"
|
|
139
|
+
url = f"{base}{path}{fragment}"
|
|
140
|
+
return ReferenceTarget(work, name, label, location, path, anchor, url)
|
|
127
141
|
|
|
128
142
|
|
|
129
143
|
def _get_fields(item: Item) -> tuple[str, _Fields]:
|
|
@@ -108,6 +108,9 @@ class CommonMarkContent(MarkdownContent):
|
|
|
108
108
|
elif cell == COL_SPAN:
|
|
109
109
|
col_span += 1
|
|
110
110
|
else:
|
|
111
|
+
# The cell is the first column of a covered cell. It ends
|
|
112
|
+
# the column span.
|
|
113
|
+
col_span = 1
|
|
111
114
|
row_span[col_index] += 1
|
|
112
115
|
lines.appendleft(f" <tr>{line}")
|
|
113
116
|
lines.appendleft("<table>")
|
|
index b435472..2313266 100644
|
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|