-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
Fixes #1932
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8188,12 +8188,19 @@ def on_short_link_pref_changed(self, o): | |
def _link_to_text(self, link): | ||
if not link: | ||
return '' | ||
if self.form['short_links'] and link_type(link) == 'page': | ||
elif self.form['short_links'] and link_type(link) == 'page': | ||
# Similar to 'short_links' notebook property but using uistate instead | ||
parts = HRef.new_from_wiki_link(link).parts() | ||
if len(parts) > 0: | ||
return parts[-1] | ||
return link | ||
try: | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
introt
Collaborator
|
||
parts = HRef.new_from_wiki_link(link).parts() | ||
except ValueError: | ||
return '' | ||
else: | ||
if len(parts) > 0: | ||
return parts[-1] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jaap-karssenberg
via email
Author
Member
|
||
else: | ||
return link | ||
else: | ||
return link | ||
|
||
def do_response_ok(self): | ||
self.uistate['short_links'] = self.form['short_links'] | ||
|
I think we should use HRef.short_name here to avoid re-implementing the same fix in multiple places