MarkdownStr
- class glotaran.utils.ipython.MarkdownStr(wrapped_str: str, *, syntax: str | None = None)[source]
Bases:
UserString
String wrapper class for rich display integration of markdown in ipython.
Initialize string class that is automatically displayed as markdown by
ipython
.- Parameters:
Note
Possible syntax highlighting values can e.g. be found here: https://support.codebasehq.com/articles/tips-tricks/syntax-highlighting-in-markdown
Methods Summary
Raises ValueError if the value is not present.
Return a translation table usable for str.translate().
Methods Documentation
- capitalize()
- casefold()
- center(width, *args)
- count(value) integer -- return number of occurrences of value
- encode(encoding='utf-8', errors='strict')
- endswith(suffix, start=0, end=9223372036854775807)
- expandtabs(tabsize=8)
- find(sub, start=0, end=9223372036854775807)
- format(*args, **kwds)
- format_map(mapping)
- index(value[, start[, stop]]) integer -- return first index of value.
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- isalnum()
- isalpha()
- isascii()
- isdecimal()
- isdigit()
- isidentifier()
- islower()
- isnumeric()
- isprintable()
- isspace()
- istitle()
- isupper()
- join(seq)
- ljust(width, *args)
- lower()
- lstrip(chars=None)
- maketrans(x, y=<unrepresentable>, z=<unrepresentable>, /)
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
- partition(sep)
- removeprefix(prefix, /)
- removesuffix(suffix, /)
- replace(old, new, maxsplit=-1)
- rfind(sub, start=0, end=9223372036854775807)
- rindex(sub, start=0, end=9223372036854775807)
- rjust(width, *args)
- rpartition(sep)
- rsplit(sep=None, maxsplit=-1)
- rstrip(chars=None)
- split(sep=None, maxsplit=-1)
- splitlines(keepends=False)
- startswith(prefix, start=0, end=9223372036854775807)
- strip(chars=None)
- swapcase()
- title()
- translate(*args)
- upper()
- zfill(width)