{"id":25188,"library":"ecmarkdown","title":"Ecmarkdown","description":"A compiler for converting Ecmarkdown algorithm shorthand (a Markdown-inspired syntax used in ECMAScript specifications) into HTML. Current stable version is 8.1.0, with a history of active development. Key differentiators: tailored specifically for writing spec algorithms, supports inline formatting for variables, values, and field references, and integrates with ecmarkup for full spec generation. The library is ESM-only and ships TypeScript type definitions. Release cadence is irregular but frequent, with breaking changes in major versions (e.g., v7 attrs, v6 column numbers, v5 types).","status":"active","version":"8.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/tc39/ecmarkdown","tags":["javascript","ecmascript","specs","typography","markup","markdown","html","code","typescript"],"install":[{"cmd":"npm install ecmarkdown","lang":"bash","label":"npm"},{"cmd":"yarn add ecmarkdown","lang":"bash","label":"yarn"},{"cmd":"pnpm add ecmarkdown","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v5; use dynamic import() in CommonJS.","wrong":"const { parse } = require('ecmarkdown')","symbol":"parse","correct":"import { parse } from 'ecmarkdown'"},{"note":"Emit is a named export from the main entry point since v5.","wrong":"import { emit } from 'ecmarkdown/emit'","symbol":"emit","correct":"import { emit } from 'ecmarkdown'"},{"note":"Type name changed from Fragment to FragmentNode in v7.1.0.","wrong":"import { Fragment } from 'ecmarkdown'","symbol":"FragmentNode","correct":"import { FragmentNode } from 'ecmarkdown'"}],"quickstart":{"code":"import { parse, emit } from 'ecmarkdown';\n\nconst input = `1. Let _x_ be *true*.\\n  1. ReturnIfAbrupt(_x_).`;\nconst doc = parse(input);\nconst html = emit(doc);\nconsole.log(html);\n// Expected output: '<emu-alg><ol><li>Let <var>x</var> be <emu-val>true</emu-val>.<ol><li>ReturnIfAbrupt(<var>x</var>).</li></ol></li></ol></emu-alg>'","lang":"typescript","description":"Shows parsing Ecmarkdown text into an AST and emitting HTML."},"warnings":[{"fix":"Update code that accesses ListItemNode.id to use ListItemNode.attrs instead.","message":"v7.0.0 changed list item 'id' attribute to 'attrs' (array of key-value pairs).","severity":"breaking","affected_versions":">=7.0.0 <8.0.0"},{"fix":"Adjust any logic relying on 0-based column numbers.","message":"v6.0.0 changed column numbers from 0-based to 1-based in location info.","severity":"breaking","affected_versions":">=6.0.0 <7.0.0"},{"fix":"Update type references and ensure lists are homogeneous.","message":"v5.0.0 changed parse node types and prevented mixing numbered/bulleted list items.","severity":"breaking","affected_versions":">=5.0.0 <6.0.0"},{"fix":"Replace `import ecmarkdown from 'ecmarkdown'` with `import { parse, emit } from 'ecmarkdown'`.","message":"Default export was removed in v5.0.0; use named exports instead.","severity":"deprecated","affected_versions":">=5.0.0"},{"fix":"Use _ proto _ (with spaces) if you need to denote a variable named 'proto'.","message":"Inline formatting constructs (e.g., _ _) are left verbatim if empty; __proto__ is not treated as a variable.","severity":"gotcha","affected_versions":">=3.0.8"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install ecmarkdown` and ensure the import path is correct.","cause":"Missing npm install or incorrect package path.","error":"Cannot find module 'ecmarkdown'"},{"fix":"Use ESM import syntax or update to v5+ where named exports are available.","cause":"Using a CommonJS require or importing from an older version without named exports.","error":"SyntaxError: The requested module 'ecmarkdown' does not provide an export named 'parse'"},{"fix":"Change `node.id` to `node.attrs` and handle array of attribute objects.","cause":"Migrated to v7.0.0 where ListItemNode.id was replaced by attrs.","error":"Property 'id' does not exist on type 'ListItemNode'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}