Convert string to GitLab Flavored Markdown Header ID
Project description
Convert string to GitLab Flavored Markdown Header ID [1]
Quickstart
String to Markdown Id is available on PyPI and can be installed with pip.
$ pip install string_to_markdown_id
After installing String to Markdown Id you can use it like any other Python module.
Here is a simple example:
from string_to_markdown_id import convertToMarkdownId
testQueries = [
r"""(This) --- --v - " "" ' ' has 2.5, 😀, 한글, :thumbsup:, , \n, \r, \t, \f, \u, \a, \x, \\t""",
"this-------v-------has-25--한글-thumbsup--n-r-t-f-u-a-x-t",
]
expected = [
"this-v-has-25-한글-thumbsup-n-r-t-f-u-a-x-t",
"this-v-has-25-한글-thumbsup-n-r-t-f-u-a-x-t-1",
]
expectedHyphenIgnore = [
"this-------v-------has-25--한글-thumbsup--n-r-t-f-u-a-x-t",
"this-------v-------has-25--한글-thumbsup--n-r-t-f-u-a-x-t-1",
]
print(f"\nGiven queries:\n{testQueries}\n")
gens = convertToMarkdownId(testQueries)
print(f"Generated IDs:\n{gens}\n")
print(f"Expected IDs:\n{expected}\n")
gens = convertToMarkdownId(testQueries, ignore_multi_hyphens=True)
print(f"Generated IDs (Hyphen Ignored):\n{gens}\n")
print(f"Expected IDs (Hyphen Ignored):\n{expectedHyphenIgnore}\n")
The API Reference provides API-level documentation.
Change Log
Version History
- 0.0.1
Project created.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file string_to_markdown_id-0.0.1-py3-none-any.whl.
File metadata
- Download URL: string_to_markdown_id-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54fece1f57c123f6b5cb0bc83368e54f20c1bf5cf811f224d2703340a1b14f7
|
|
| MD5 |
0ebc47470580d55d3374a12e93c2d6c5
|
|
| BLAKE2b-256 |
a121bae3cc4f5ec8231cadbce4ff086bc18afd61ea8bd043db8f20819185fea6
|