
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
remark-tangle
Advanced tools
Remark and mdast plugins for creating interactive markdown documents.
Remark-Tangle extends plain text markdown with a special notation (based on links) for adding controls and variables with Tangle. It's like a lightweight and inline version of Jupyter, Observable, R, or Wolfram notebooks. Or, if you like, a messier alternative to spreadsheets.
A sample Model-Driven Markdown file looks like this:
### How many cookies?
When you eat [3 cookies](cookies=[0..100]), you consume **[150 calories](calories)**.
That's [7.5%](daily_percent&margin-right=0.5ch) of your recommended daily calories.
| Calculation for daily % | |
| ----------------------- | ----------------------- |
| [`cookies`](cookies) | = [5 cookies](cookies&margin-left=1ch) |
| [`calories_per_cookie`](calories_per_cookie) | = [50 calories](calories_per_cookie=[10..100;5]&margin-left=1ch) |
| [`calories`](calories) | = [`calories_per_cookie`](calories_per_cookie&margin-left=1ch&margin-right=1ch)*[`cookies`](cookies&margin-left=1ch&margin-right=1ch) = [150 calories](calories=calories_per_cookie*cookies&margin-left=1ch) |
| [`calories_per_day`](calories_per_day) | = [2000 calories](calories_per_day=[0..10000;100]&margin-left=1ch) |
| [`daily_percent`](daily_percent) | = [`calories`](calories&margin-left=1ch&margin-right=1ch)/[`calories_per_day`](calories_per_day&margin-left=1ch&margin-right=1ch) = [7.5%](daily_percent=calories/calories_per_day&margin-left=1ch) |
And, when compiled to html, yields a page that looks like this :

The best part about the format (IMHO) is that it has a clean fallback in standard HTML (as long as you can ignore broken links):
How many cookies?
When you eat 3 cookies, you consume 150 calories. That's 7.5% of your recommended daily calories.
Calculation for daily %
| cookies | = 5 cookies |
| calories_per_cookie | = 50 calories |
| calories | = calories_per_cookie*cookies = 150 calories |
| calories_per_day | = 2000 calories |
| daily_percent | = calories/calories_per_day = 7.5% |
The project exports a plugin from /dist/index.js that you should use after remarkParse and before remarkRehype.
To get this to work with Next.js, I've had to downgrade hastscript -> hastscript@^6.0.0 and unist-util-visit@^2.0.1.
The unified plugin ecosystem is making a push to full esm modules, but next.config.js only allows require imports.
When next.js makes the transition, I'll deprecate the commonjs build.
The default notation takes advantage of link notation to provide a clean fallback in standard markdown.
Tangle fields take the format: [display string](variable-configuration).
There's an alternative notation via
remark-directive if you prefer to leave your links untouched: :t[display string]{variable configuration}.
For example:
:t[3 cookies]{num_cookies=[1..10;.5]} defines a variable, num_cookies, with default value 3, display template %d cookies (using inferred printf notation), that can take values from the range 1 to 10 inclusive, with step size 0.5.:t[150. calories]{num_calories=num_cookies*num_calories_per_cookie} defines a variable, num_calories that depends on the values of num_cookies and num_calories_per_cookie, with display template %.0f calories.:t[150 calories]{num_calories} creates a reference to a variable already defined elsewhere. These are automatically synchronized.See the reference for a full account of different types of fields and their configuration.
Note: you can add other key-value pairs to customize the styling (which is useful for spacing). Use the separator
&in link format and a blank space in directive-format:[5 cookies](cookies=[0..10]&margin-left=1ch)vs.:t[5 cookies]{cookies=[0..10] margin-left=1ch}
There's still a lot to do.
This opens you up for some serious XSS vulnerabilities. Be careful, know what you are doing.
This project is still very early on, so I welcome any kind of support you might want to offer.
The concepts and notation are inspired by a bunch of different projects:
MIT © Jesse Hoogland
FAQs
A remark plugin for making interactive markdown documents with Tangle.
We found that remark-tangle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.