securemark 0.227.1 → 0.228.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.228.0
4
+
5
+ - Change table syntax to require horizontal alignment in alignment syntax.
6
+
3
7
  ## 0.227.1
4
8
 
5
9
  - Update dependencies.
@@ -1,4 +1,4 @@
1
- /*! securemark v0.227.1 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
1
+ /*! securemark v0.228.0 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
2
2
  require = function () {
3
3
  function r(e, n, t) {
4
4
  function o(i, f) {
@@ -5261,9 +5261,9 @@ require = function () {
5261
5261
  (0, combinator_1.some)(dataline, alignment)
5262
5262
  ]))
5263
5263
  ]), ns => !(0, alias_1.isArray)(ns[0]) ? (0, array_1.unshift)([[[]]], ns) : ns)));
5264
- const alignment = /^[#:]?(?:[-=<>]+(?:\/[-=^v]*)?|\/[-=^v]+)(?=[^\S\n]*\n)/;
5264
+ const alignment = /^[#:]?[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)/;
5265
5265
  const align = (0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.union)([(0, source_1.str)(alignment)]), ([s]) => s.split('/').map(s => s.split(''))));
5266
- const delimiter = /^[#:]?(?:[-=<>]+(?:\/[-=^v]*)?|\/[-=^v]+)(?=[^\S\n]*\n)|^[#:](?:(?!:!*[^\S\n]|0)\d*:(?!0)\d*)?!*(?=[^\S\n])/;
5266
+ const delimiter = /^[#:]?[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)|^[#:](?:(?!:!*[^\S\n]|0)\d*:(?!0)\d*)?!*(?=[^\S\n])/;
5267
5267
  const head = (0, combinator_1.creator)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^#(?:(?!:!*[^\S\n]|0)\d*:(?!0)\d*)?!*(?=[^\S\n])/), (0, combinator_1.rewrite)((0, combinator_1.inits)([
5268
5268
  source_1.anyline,
5269
5269
  (0, combinator_1.some)(source_1.contentline, delimiter)
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "securemark",
3
- "version": "0.227.1",
3
+ "version": "0.228.0",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "securemark",
3
- "version": "0.227.1",
3
+ "version": "0.228.0",
4
4
  "description": "Secure markdown renderer working on browsers for user input data.",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/falsandtru/securemark",
@@ -140,7 +140,7 @@ describe('Unit: parser/block/extension/table', () => {
140
140
  inspect(parser('~~~table\n-=<>/-=^v\n~~~')),
141
141
  [[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
142
142
  assert.deepStrictEqual(
143
- inspect(parser('~~~table\n/-=^v\n~~~')),
143
+ inspect(parser('~~~table\n-/-=^v\n~~~')),
144
144
  [[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
145
145
  assert.deepStrictEqual(
146
146
  inspect(parser('~~~table\n-=^v\n~~~')),
@@ -206,7 +206,7 @@ describe('Unit: parser/block/extension/table', () => {
206
206
  html('tfoot'),
207
207
  ]).outerHTML], '']);
208
208
  assert.deepStrictEqual(
209
- inspect(parser('~~~table\n/=-^v\n1.1\n1.2\n1.3\n1.4\n1.5\n1.6\n~~~')),
209
+ inspect(parser('~~~table\n-/=-^v\n1.1\n1.2\n1.3\n1.4\n1.5\n1.6\n~~~')),
210
210
  [[html('table', [
211
211
  html('thead'),
212
212
  html('tbody', [
@@ -222,7 +222,7 @@ describe('Unit: parser/block/extension/table', () => {
222
222
  html('tfoot'),
223
223
  ]).outerHTML], '']);
224
224
  assert.deepStrictEqual(
225
- inspect(parser('~~~table\n/=^\n/-\n2.1\n2.2\n2.3\n~~~')),
225
+ inspect(parser('~~~table\n-/=^\n-/-\n2.1\n2.2\n2.3\n~~~')),
226
226
  [[html('table', [
227
227
  html('thead', [html('tr')]),
228
228
  html('tbody', [
@@ -246,7 +246,7 @@ describe('Unit: parser/block/extension/table', () => {
246
246
  html('tbody'),
247
247
  html('tfoot')]).outerHTML], '']);
248
248
  assert.deepStrictEqual(
249
- inspect(parser('~~~table\n#/-\n1.1\n~~~')),
249
+ inspect(parser('~~~table\n#-/-\n1.1\n~~~')),
250
250
  [[html('table', [
251
251
  html('thead', [
252
252
  html('tr', [html('td', '1.1')]),
@@ -67,13 +67,13 @@ const row: RowParser = lazy(() => dup(fmap(
67
67
  ]),
68
68
  ns => !isArray(ns[0]) ? unshift([[[]]], ns) : ns)));
69
69
 
70
- const alignment = /^[#:]?(?:[-=<>]+(?:\/[-=^v]*)?|\/[-=^v]+)(?=[^\S\n]*\n)/;
70
+ const alignment = /^[#:]?[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)/;
71
71
 
72
72
  const align: AlignParser = line(fmap(
73
73
  union([str(alignment)]),
74
74
  ([s]) => s.split('/').map(s => s.split(''))));
75
75
 
76
- const delimiter = /^[#:]?(?:[-=<>]+(?:\/[-=^v]*)?|\/[-=^v]+)(?=[^\S\n]*\n)|^[#:](?:(?!:!*[^\S\n]|0)\d*:(?!0)\d*)?!*(?=[^\S\n])/;
76
+ const delimiter = /^[#:]?[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)|^[#:](?:(?!:!*[^\S\n]|0)\d*:(?!0)\d*)?!*(?=[^\S\n])/;
77
77
 
78
78
  const head: CellParser.HeadParser = creator(block(fmap(open(
79
79
  str(/^#(?:(?!:!*[^\S\n]|0)\d*:(?!0)\d*)?!*(?=[^\S\n])/),