@@ -197,7 +197,7 @@ def makeURL(word, pattern):
197
197
'''
198
198
Create a URL from the word and pattern.
199
199
200
- word [in] The word to build the hot-link around.
200
+ word [in] The word to build the URL around.
201
201
pattern [in] The URL pattern to reference.
202
202
returns A URL.
203
203
'''
@@ -218,7 +218,7 @@ def resolveName(name, aliasDict):
218
218
If not, attempt to resolve the name into a URL using the names
219
219
part of the alias dictionary.
220
220
221
- name [in] A name to attempt to resolve into a hot-link string.
221
+ name [in] A name to attempt to resolve into a URL string.
222
222
aliasDict [in] A dictionary of URI patterns keyed by the elements they
223
223
replace.
224
224
returns A URL, or None if there was no resolution.
@@ -243,7 +243,7 @@ def resolveName(name, aliasDict):
243
243
contextPart = nameParts [0 ]
244
244
namePart = nameParts [1 ]
245
245
246
- # If the context exists in the alias dictionary, create a hot-link
246
+ # If the context exists in the alias dictionary, create a URL
247
247
# string using the pattern for the context and the name part.
248
248
#
249
249
if contextPart in aliasDict ['contexts' ]:
@@ -253,7 +253,7 @@ def resolveName(name, aliasDict):
253
253
254
254
break
255
255
256
- # If the name exists in the alias dictionary, create a hot-link string
256
+ # If the name exists in the alias dictionary, create a URL string
257
257
# using the pattern for the name.
258
258
#
259
259
if name in aliasDict ['names' ]:
@@ -285,12 +285,21 @@ def resolveValue(name, value, aliasDict):
285
285
#
286
286
result = None
287
287
288
+ # Attempt to split the value on '__'.
289
+ #
290
+ valueParts = value .split ('__' )
291
+
292
+ # If there is a context part, resolve the value as a name.
293
+ #
294
+ if 2 == len (valueParts ):
295
+ result = resolveName (value , aliasDict )
296
+
288
297
# If the name exists in the alias dictionary, and if the value exists in
289
298
# the sub-dictionary for the name, create a URL using the pattern for the
290
299
# value. A wildcard (*) for a value key in the dictionary matches any
291
300
# value.
292
301
#
293
- if name in aliasDict ['values' ]:
302
+ elif name in aliasDict ['values' ]:
294
303
subDict = aliasDict ['values' ][name ]
295
304
296
305
pattern = None
0 commit comments