String to Markdown Id
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.
Metadata
Release files for string-to-markdown-id 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| string_to_markdown_id-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / string_to_markdown_id-0.0.1-py3-none-any.whl
| Download URL | string_to_markdown_id-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a54fece1f57c123f6b5cb0bc83368e54f20c1bf5cf811f224d2703340a1b14f7
|
|
BLAKE2b-256 checksum How to use checksums |
a121bae3cc4f5ec8231cadbce4ff086bc18afd61ea8bd043db8f20819185fea6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for string-to-markdown-id 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.