コード例 #1
0
    def html(self):
        link_text = ''
        if self.target_path:
            for path in sorted(list(self.target_path)):
                in_note_folder = ''
                if len(self.target_path) > 1:
                    if path.parent.name:
                        in_note_folder = f' in {path.parent.name}'
                path = urllib.parse.quote(str(path.as_posix())) if path else ''
                hyper_link = html_string_builders.hyperlink(
                    f"{self.contents}{in_note_folder}, ", path)
                link_text = f'{link_text}{hyper_link}'

            return f"{link_text} "

        return html_string_builders.hyperlink(
            f"{self.contents} - Unable to link to note. ", "")
コード例 #2
0
    def html(self):
        link_text = ''
        if self.target_path:
            for path in sorted(list(self.target_path)):
                path = path if path else ''
                hyper_link = html_string_builders.hyperlink(
                    f"{self.contents} ", path)
                link_text = f'{link_text}{hyper_link}'

        return link_text
コード例 #3
0
 def html(self):
     return html_string_builders.hyperlink(self.contents, self.href)
コード例 #4
0
 def html(self):
     return html_string_builders.hyperlink(self.contents, self.target_path)
コード例 #5
0
    def html(self):
        path = self.target_path if self.target_path else ''

        return html_string_builders.hyperlink(f"{self.contents} ", path)