{"id":23153802,"url":"https://github.com/paperist/remark-caption","last_synced_at":"2025-07-26T18:13:02.678Z","repository":{"id":57135090,"uuid":"74817146","full_name":"Paperist/remark-caption","owner":"Paperist","description":"wooorm/remark plugin for caption","archived":false,"fork":false,"pushed_at":"2023-07-12T00:12:23.000Z","size":119,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-22T22:17:38.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Paperist.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2016-11-26T09:43:29.000Z","updated_at":"2019-07-21T18:21:42.000Z","dependencies_parsed_at":"2023-07-18T08:04:01.599Z","dependency_job_id":null,"html_url":"https://github.com/Paperist/remark-caption","commit_stats":null,"previous_names":["paperist/remark-table-caption"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paperist%2Fremark-caption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paperist%2Fremark-caption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paperist%2Fremark-caption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paperist%2Fremark-caption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paperist","download_url":"https://codeload.github.com/Paperist/remark-caption/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247214686,"owners_count":20902833,"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":[],"created_at":"2024-12-17T20:10:01.894Z","updated_at":"2025-04-04T16:42:20.928Z","avatar_url":"https://github.com/Paperist.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @paperist/remark-caption\n\n[![LICENSE][license-badge]][license]\n[![NPM][npm-badge]][npm]\n[![standard-readme compliant][standard-readme-badge]][standard-readme]\n\n[npm]: https://www.npmjs.com/package/@paperist/remark-caption\n[license]: https://3846masa.mit-license.org\n[standard-readme]: https://github.com/RichardLitt/standard-readme\n[npm-badge]: https://flat.badgen.net/npm/v/@paperist/remark-caption\n[license-badge]: https://flat.badgen.net/badge/license/MIT/blue\n[standard-readme-badge]: https://flat.badgen.net/badge/standard-readme/OK/green\n\n\u003e [wooorm/remark] plugin for caption\n\nSupport [Pandoc's table / code caption][table-caption] at wooorm/remark.\n\n[wooorm/remark]: https://github.com/wooorm/remark\n[table-caption]: http://pandoc.org/MANUAL.html#extension-table_captions\n\n## Table of Contents\n\n\u003c!-- TOC depthFrom:2 depthTo:3 updateOnSave:false --\u003e\n\n- [Install](#install)\n- [Usage](#usage)\n- [AST](#ast)\n  - [`CaptionBlock`](#captionblock)\n- [Contribute](#contribute)\n- [License](#license)\n\n\u003c!-- /TOC --\u003e\n\n## Install\n\n```\nnpm i remark @paperist/remark-caption\n```\n\n## Usage\n\n```js\nconst unified = require('unified');\nconst parser = require('remark-parse');\nconst tableCaption = require('@paperist/remark-caption');\n\nconst markdown = `\n| Right | Left | Default | Center |\n|------:|:-----|---------|:------:|\n|   12  |  12  |    12   |    12  |\n|  123  |  123 |   123   |   123  |\n|    1  |    1 |     1   |     1  |\n\nTable: Demonstration of pipe table syntax.\n\n\n~~~rb\nputs \"Hello World!\";\n~~~\n\nCode: Hello World written by Ruby.\n`;\n\nconst processor = unified()\n  .use(parser)\n  .use(tableCaption);\nconst ast = processor.parse(markdown);\n\nprocessor.run(ast).then((ast) =\u003e {\n  console.dir(ast, { depth: null });\n});\n```\n\n## AST\n\nSee also [mdast], [unist].\n\n[mdast]: https://github.com/syntax-tree/mdast\n[unist]: https://github.com/syntax-tree/unist\n\n### `CaptionBlock`\n\n`CaptionBlock` extends [`Parent`][unist-parent].\n\n```typescript\ninterface CaptionBlock extends Parent {\n  type: 'captionBlock';\n}\n```\n\nFor example, the following markdown:\n\n```md\nTable: Caption {#tbl:label}\n```\n\nYields:\n\n```json\n{\n  \"type\": \"captionBlock\",\n  \"children\": [\n    {\n      \"type\": \"text\",\n      \"value\": \"Caption {#tbl:lable}\"\n    }\n  ]\n}\n```\n\n[unist-parent]: https://github.com/syntax-tree/unist#parent\n\n## Contribute\n\nPRs accepted.\n\n## License\n\n[MIT (c) 3846masa](https://3846masa.mit-license.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaperist%2Fremark-caption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaperist%2Fremark-caption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaperist%2Fremark-caption/lists"}