{"id":17310564,"url":"https://github.com/digitalmoksha/markdown-it-inject-linenumbers","last_synced_at":"2025-04-13T08:52:45.207Z","repository":{"id":142132209,"uuid":"83540800","full_name":"digitalmoksha/markdown-it-inject-linenumbers","owner":"digitalmoksha","description":"Insert line numbers to support sync scrolling for the markdown-it parser.","archived":false,"fork":false,"pushed_at":"2023-03-17T20:56:42.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T20:38:27.379Z","etag":null,"topics":["markdown-it","plugin"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/digitalmoksha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-01T10:10:39.000Z","updated_at":"2024-10-17T07:05:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"64b3bc68-beb2-4aaa-bb82-f718ecf4e166","html_url":"https://github.com/digitalmoksha/markdown-it-inject-linenumbers","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalmoksha%2Fmarkdown-it-inject-linenumbers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalmoksha%2Fmarkdown-it-inject-linenumbers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalmoksha%2Fmarkdown-it-inject-linenumbers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalmoksha%2Fmarkdown-it-inject-linenumbers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalmoksha","download_url":"https://codeload.github.com/digitalmoksha/markdown-it-inject-linenumbers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688542,"owners_count":21145763,"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","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":["markdown-it","plugin"],"created_at":"2024-10-15T12:37:41.020Z","updated_at":"2025-04-13T08:52:45.201Z","avatar_url":"https://github.com/digitalmoksha.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# markdown-it-inject-linenumbers\n\n\u003e Insert line numbers to support sync scrolling for the [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.\n\nInject the source line numbers into the final HTML.  This gives you the anchor points to implement synchronized scrolling.\n\n`lorem` =\u003e `\u003cp class=\"line\" data-source-line=\"0\"\u003elorem\u003c/p\u003e`\n\nInline elements are not supported. Only the following block level elements are currently supported:\n\n- headings\n- paragraphs\n- list items\n- tables\n\n_This plugin was built using the [markdown-it demo](https://github.com/markdown-it/markdown-it/tree/master/support/demo_template) sync scrolling as a starting point._\n\n## Install\n\nnode.js, browser:\n\n```bash\nnpm install markdown-it-inject-linenumbers --save\nbower install markdown-it-inject-linenumbers --save\n```\n\n## Use\n\n```js\nvar md = require('markdown-it')()\n            .use(require('markdown-it-inject-linenumbers'));\n\nmd.render('lorem') // =\u003e '\u003cp class=\"source-line\" data-source-line=\"0\"\u003elorem\u003c/p\u003e'\n```\n\n_Differences in browser._ If you load script directly into the page, without\npackage system, module will add itself globally as `window.markdownitInjectLinenumbers`.\n\n\n## License\n\n[MIT](https://github.com/digitalmoksha/markdown-it-inject-linenumbers/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalmoksha%2Fmarkdown-it-inject-linenumbers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalmoksha%2Fmarkdown-it-inject-linenumbers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalmoksha%2Fmarkdown-it-inject-linenumbers/lists"}