{"id":29724599,"url":"https://github.com/mastersign/mdheadline","last_synced_at":"2025-07-24T21:23:30.300Z","repository":{"id":57293555,"uuid":"47125254","full_name":"mastersign/mdheadline","owner":"mastersign","description":"helper function for processing Markdown headlines","archived":false,"fork":false,"pushed_at":"2024-06-16T21:41:14.000Z","size":47,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T08:43:34.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mastersign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-30T14:47:13.000Z","updated_at":"2022-12-05T07:07:29.000Z","dependencies_parsed_at":"2023-01-24T03:31:11.413Z","dependency_job_id":null,"html_url":"https://github.com/mastersign/mdheadline","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mastersign/mdheadline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdheadline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdheadline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdheadline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdheadline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastersign","download_url":"https://codeload.github.com/mastersign/mdheadline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdheadline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266904631,"owners_count":24004135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-24T21:23:27.870Z","updated_at":"2025-07-24T21:23:30.284Z","avatar_url":"https://github.com/mastersign.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MdHeadline\n==========\n\n[![npm package][npm-img]][npm-url]\n[![dependency status][libraries-img]][libraries-url]\n[![build status][travis-img]][travis-url]\n\n\u003e helper functions for processing [Markdown] headlines\n\nFunctions\n---------\n\nTo use a function require _MdHeadline_ and call the function as a member of the module.\n\n``` js\n// require MdHeadline\nvar mdheadline = require('mdheadline');\n\n// call a function from the module\nvar href = '#' + mdheadline.anchor('## 1. Einführung'); // -\u003e '#einführung'\n```\n\n### `anchor(title)`\n\nDerives an HTML anchor for a headline.\nUses the same rules as [Pandoc].\n\n### `getAttributes(title)`\n\nParses the attributes of a headline and returnes a map with the found attributes.\nSupportes the [PHP Markdown Extra syntax][spe-attr],\n\nThe following attribute types are supported:\n\n* ID attributes like `# Chapter 1 { #ch_1 }`\n  (is mapped to the key `id`)\n* Class attributes `# Chapter 1 { .highlighted .pivot }`\n  (are mapped as an array to the key `classes`)\n* Explicit key value pairs `## Section 1. 2. { level=2 number=\"1. 2.\" }`\n  (are mapped under thier given name)\n\nExample:\n\n``` js\nvar title = '## Chapter 1 { #ch_1 level=2 .highlighted .pivot }';\nvar attributes = mdheadline.getAttributes(title);\n```\n\nResult:\n\n``` json\n{\n  \"id\": \"ch_1\",\n  \"classes\": [ \"highlighted\", \"pivot\" ],\n  \"level\": \"2\"\n} \n```\n\n### `removeFormat(title)`\n\nStrippes a headline from all formatting and optional [attributes][spe-attr].\n\nLicense\n-------\n\n_MdHeadline_ is published under MIT license.\n\n[npm-url]: https://www.npmjs.com/package/mdheadline\n[npm-img]: https://img.shields.io/npm/v/mdheadline.svg\n[libraries-url]: https://libraries.io/npm/mdheadline\n[libraries-img]: https://img.shields.io/librariesio/github/mastersign/mdheadline.svg\n[travis-img]: https://img.shields.io/travis/mastersign/mdheadline/master.svg\n[travis-url]: https://travis-ci.org/mastersign/mdheadline\n[Markdown]: https://daringfireball.net/projects/markdown/\n[spe-attr]: https://michelf.ca/projects/php-markdown/extra/#spe-attr\n[Pandoc]: http://pandoc.org/README.html#header-identifiers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastersign%2Fmdheadline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastersign%2Fmdheadline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastersign%2Fmdheadline/lists"}