Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ecmarkdown

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecmarkdown - npm Package Compare versions

Comparing version 3.0.8 to 3.0.9

8

lib/parser.js

@@ -209,3 +209,3 @@ 'use strict';

if ((!onStack && isValidStartFormat(prev, tok, next)) ||
(onStack && isValidEndFormat(prev, tok, next))) {
(onStack && isValidEndFormat(prev, tok))) {
break;

@@ -299,3 +299,3 @@ }

function isValidEndFormat(prev, cur, next) {
function isValidEndFormat(prev, cur) {
if (cur.name === 'tick') {

@@ -305,3 +305,3 @@ return true;

return !isWhitespace(prev) && (next.name === 'EOF' || !isAlphaNumeric(next.contents[0]));
return !isWhitespace(prev);
}

@@ -331,3 +331,3 @@

// TODO: Rationalize with Grammarkdown (? instead of _opt)
const nonTerminalRe = /^([A-Za-z]+)(?:\[([^\]]+)\])?(_opt)?$/;
const nonTerminalRe = /^([A-Za-z0-9]+)(?:\[([^\]]+)\])?(_opt)?$/;
function parseNonTerminal(str) {

@@ -334,0 +334,0 @@ const match = str.match(nonTerminalRe);

{
"name": "ecmarkdown",
"version": "3.0.8",
"version": "3.0.9",
"description": "A compiler for \"Ecmarkdown\" algorithm shorthand into HTML.",

@@ -5,0 +5,0 @@ "main": "lib/ecmarkdown.js",

@@ -94,3 +94,3 @@ # Ecmarkdown

**Variables** are written as `_x_` and are translated to `<var>x</var>`. Variables cannot contain whitespace or other formatting characters. You can use variables adjacent to other characters, e.g. as in `_SIMD_Constructor`, as long as the start of the variable is preceded by whitespace (e.g. `my_SIMD_constructor` does not contain any variables).
**Variables** are written as `_x_` and are translated to `<var>x</var>`. Variables cannot contain whitespace or other formatting characters.

@@ -103,4 +103,6 @@ **Values** are written as `*x*` and are translated to `<emu-val>x</emu-val>`. Values cannot contain asterisks.

**Nonterminals** are written as `|x|`, `|x_opt|`, `|x[p]|`, or `|x[p]_opt|`. These are translated, respectively, into `<emu-nt>x</emu-nt>`, `<emu-nt optional>x</emu-nt>`, `<emu-nt params="p">x</emu-nt>`, or `<emu-nt params="p" optional>x</emu-nt>`. Nonterminal names can only be composed of letters. Params can be composed of anything except a closing square bracket.
**Nonterminals** are written as `|x|`, `|x_opt|`, `|x[p]|`, or `|x[p]_opt|`. These are translated, respectively, into `<emu-nt>x</emu-nt>`, `<emu-nt optional>x</emu-nt>`, `<emu-nt params="p">x</emu-nt>`, or `<emu-nt params="p" optional>x</emu-nt>`. Nonterminal names can only be composed of letters and numbers. Params can be composed of anything except a closing square bracket.
All formats can be started following non-alphanumeric and non-whitespace characters and can be ended following any non-whitespace character. The one exception is code formats which can begin and end in any context. For example, `my_SIMD_constructor` does not contain any variables while `_SIMD_Constructor` does.
You can escape any format above with a backslash. Escaping of any non-format characters will not be considered an escape and will render literally (eg. `\a` simply renders as `\a`). If you need a literal backslash before a formatting character, you must escape the backslash (eg. `\\*foo*` renders as `\<emu-val>foo</emu-val>`).

@@ -107,0 +109,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc