{"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,"search_vec":"'8.1.0':24 'activ':29 'algorithm':7,38 'attr':81 'break':74 'cadenc':68 'chang':75 'code':94 'column':83 'compil':3 'convert':5 'current':20 'definit':66 'develop':30 'differenti':32 'e.g':79 'ecmarkdown':1,6 'ecmarkup':51 'ecmascript':16,88 'esm':60 'esm-on':59 'field':46 'format':41 'frequent':72 'full':53 'generat':55 'histori':27 'html':19,93 'inlin':40 'inspir':12 'integr':49 'irregular':70 'javascript':87 'key':31 'librari':57 'major':77 'markdown':11,92 'markdown-inspir':10 'markup':91 'number':84 'refer':47 'releas':67 'ship':63 'shorthand':8 'spec':37,54,89 'specif':17,34 'stabl':21 'support':39 'syntax':13 'tailor':33 'type':65,86 'typescript':64,95 'typographi':90 'use':14 'v5':85 'v6':82 'v7':80 'valu':44 'variabl':43 'version':22,78 'write':36","created_at":"2026-05-01T13:43:28.302815+00:00","updated_at":"2026-05-01T13:43:28.302815+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"ecmarkdown","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/tc39/ecmarkdown","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ecmarkdown","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}