Ejemplo n.º 1
0
    def markdown(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()))
                path_link = markdown_string_builders.link(
                    f"{self.contents}{in_note_folder}", path)
                link_text = f"{link_text}{path_link}, "

            return f"{link_text}"

        return markdown_string_builders.link(
            f'{self.contents} - Unable to link to note', "")
Ejemplo n.º 2
0
    def markdown(self):
        link_text = ''
        if self.target_path_absolute:
            for path in sorted(list(self.target_path_absolute)):
                uri_path = path.as_uri()
                path_link = markdown_string_builders.link(
                    self.contents, uri_path)
                link_text = f"{link_text}{path_link} "

        return f"{link_text}"
Ejemplo n.º 3
0
 def markdown(self):
     return markdown_string_builders.link(self.contents, self.href)
Ejemplo n.º 4
0
 def markdown(self):
     return markdown_string_builders.link(self.contents, self.target_path)
Ejemplo n.º 5
0
 def markdown(self):
     path = self.target_path.as_uri() if self.target_path else ''
     return markdown_string_builders.link(self.contents, path)