------------------------------------------------------------
commit c2f39c41c58c69b2fca0e5c77cb4d494044d8bcc
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:09:35 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index 970ba8f..24af204 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,5 +1,6 @@
buildHtml
buildTxt
+title Hello world
metaTags
gazetteCss
@@ -13,6 +14,6 @@ customAsteriskParser
javascript
compile() {return "⭐️⭐️" + this.content }
-* This is my /it/ __custom__ *asterisk* parser.
+* This is my __custom__ *asterisk* parser.
pageFooter
------------------------------------------------------------
commit 707cb7a9a325bbba342c686248bdf95cebda20ce
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:09:22 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index a647c41..970ba8f 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,6 +1,5 @@
buildHtml
buildTxt
-title Hello world
metaTags
gazetteCss
------------------------------------------------------------
commit 8abdab5b8a0854d569a4cd9114f4d2bbc2f951b9
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:09:15 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index 84f1e91..a647c41 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,18 +1,19 @@
-buildTxt
-title Hello world
-
-metaTags
-gazetteCss
-pageHeader
-printTitle
-mediumColumns 1
-
-customAsteriskParser
- extends abstractScrollParser
- crux *
- javascript
- compile() {return "⭐️⭐️" + this.content }
-
-* This is my /it/ __custom__ *asterisk* parser.
-
-pageFooter
+buildHtml
+buildTxt
+title Hello world
+
+metaTags
+gazetteCss
+pageHeader
+printTitle
+mediumColumns 1
+
+customAsteriskParser
+ extends abstractScrollParser
+ crux *
+ javascript
+ compile() {return "⭐️⭐️" + this.content }
+
+* This is my /it/ __custom__ *asterisk* parser.
+
+pageFooter
------------------------------------------------------------
commit 591f712e550513d5bd225ff71c647f6aaa9cfbda
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:08:58 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index a647c41..84f1e91 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,19 +1,18 @@
-buildHtml
-buildTxt
-title Hello world
-
-metaTags
-gazetteCss
-pageHeader
-printTitle
-mediumColumns 1
-
-customAsteriskParser
- extends abstractScrollParser
- crux *
- javascript
- compile() {return "⭐️⭐️" + this.content }
-
-* This is my /it/ __custom__ *asterisk* parser.
-
-pageFooter
+buildTxt
+title Hello world
+
+metaTags
+gazetteCss
+pageHeader
+printTitle
+mediumColumns 1
+
+customAsteriskParser
+ extends abstractScrollParser
+ crux *
+ javascript
+ compile() {return "⭐️⭐️" + this.content }
+
+* This is my /it/ __custom__ *asterisk* parser.
+
+pageFooter
------------------------------------------------------------
commit 430d4adcf86c444f2e11741b8115eb87ee54c6c0
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:08:53 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index a8ed8dd..a647c41 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,13 +1,19 @@
-buildHtml
-buildTxt
-title Hello world
-
-metaTags
-gazetteCss
-pageHeader
-printTitle
-mediumColumns 1
-
-* This is my /it/ __custom__ *asterisk* parser.
-
-pageFooter
+buildHtml
+buildTxt
+title Hello world
+
+metaTags
+gazetteCss
+pageHeader
+printTitle
+mediumColumns 1
+
+customAsteriskParser
+ extends abstractScrollParser
+ crux *
+ javascript
+ compile() {return "⭐️⭐️" + this.content }
+
+* This is my /it/ __custom__ *asterisk* parser.
+
+pageFooter
------------------------------------------------------------
commit d8bf4276e9e6134de71dc57a01cdc0281d37654a
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:08:29 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index f28a9ee..a8ed8dd 100644
--- a/index.scroll
+++ b/index.scroll
@@ -8,6 +8,6 @@ pageHeader
printTitle
mediumColumns 1
-* This is my ¦sdf¦ __custom__ *asterisk* parser.
+* This is my /it/ __custom__ *asterisk* parser.
pageFooter
------------------------------------------------------------
commit 0dd8614bb2325c74f34302720659ebf790ccc963
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 11:03:25 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index bc7d408..f28a9ee 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,55 +1,13 @@
-buildHtml
-buildTxt
-title Hello world
-
-metaTags
-gazetteCss
-pageHeader
-printTitle
-mediumColumns 1
-
-wrapsOnParser
- cruxFromId
- description Only turn on named wraps.
- example
- Hello *world*!
- wrapsOn bold
- extends abstractAftertextDirectiveParser
- catchAllCellType wrapNameCell
- javascript
- get shouldMatchAll() {
- return true
- }
- get wraps() {
- const wraps = [{delimiter: "¦", tag: "code", exclusive: true, name: "code"},{delimiter: "*", tag: "strong", name: "bold"}, {delimiter: "_", tag: "em", name: "italics"}]
- if (this.content)
- return wraps.filter(wrap => this.content.includes(wrap.name))
- return wraps
- }
- matchWholeLine = true
- getMatches(text) {
- const exclusives = []
- return this.wraps.map(wrap => this.runPattern(text, wrap, exclusives)).filter(i => i).flat()
- }
- runPattern(text, wrap, exclusives = []) {
- const {delimiter, tag, attributes} = wrap
- const escapedDelimiter = delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
- const pattern = new RegExp(`${escapedDelimiter}[^${escapedDelimiter}]+${escapedDelimiter}`, "g")
- const delimiterLength = delimiter.length
- return [...text.matchAll(pattern)].map(match => {
- const { index } = match
- const endIndex = index + match[0].length
- if (exclusives.some(exclusive => index >= exclusive[0] && index <= exclusive[1]))
- return undefined
- if (wrap.exclusive)
- exclusives.push([index, endIndex])
- return [
- { index, string: `<${tag + (attributes ? " " + attributes : "")}>`, endIndex, consumeStartCharacters: delimiterLength },
- { index: endIndex, endIndex, string: `</${tag}>`, consumeEndCharacters: delimiterLength }
- ]
- }).filter(i => i)
- }
-
-* This is my ¦sdf¦ __custom__ *asterisk* parser.
-
-pageFooter
+buildHtml
+buildTxt
+title Hello world
+
+metaTags
+gazetteCss
+pageHeader
+printTitle
+mediumColumns 1
+
+* This is my ¦sdf¦ __custom__ *asterisk* parser.
+
+pageFooter
------------------------------------------------------------
commit df03bcff7479bd0e1385ab7f762cb7df8f818da2
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 10:59:38 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index c7e3abb..bc7d408 100644
--- a/index.scroll
+++ b/index.scroll
@@ -8,12 +8,48 @@ pageHeader
printTitle
mediumColumns 1
-customAsteriskParser
- extends wrapsOnParser
- crux *
+wrapsOnParser
+ cruxFromId
+ description Only turn on named wraps.
+ example
+ Hello *world*!
+ wrapsOn bold
+ extends abstractAftertextDirectiveParser
+ catchAllCellType wrapNameCell
javascript
- compile() {return "⭐️⭐️" + this.content }
+ get shouldMatchAll() {
+ return true
+ }
+ get wraps() {
+ const wraps = [{delimiter: "¦", tag: "code", exclusive: true, name: "code"},{delimiter: "*", tag: "strong", name: "bold"}, {delimiter: "_", tag: "em", name: "italics"}]
+ if (this.content)
+ return wraps.filter(wrap => this.content.includes(wrap.name))
+ return wraps
+ }
+ matchWholeLine = true
+ getMatches(text) {
+ const exclusives = []
+ return this.wraps.map(wrap => this.runPattern(text, wrap, exclusives)).filter(i => i).flat()
+ }
+ runPattern(text, wrap, exclusives = []) {
+ const {delimiter, tag, attributes} = wrap
+ const escapedDelimiter = delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
+ const pattern = new RegExp(`${escapedDelimiter}[^${escapedDelimiter}]+${escapedDelimiter}`, "g")
+ const delimiterLength = delimiter.length
+ return [...text.matchAll(pattern)].map(match => {
+ const { index } = match
+ const endIndex = index + match[0].length
+ if (exclusives.some(exclusive => index >= exclusive[0] && index <= exclusive[1]))
+ return undefined
+ if (wrap.exclusive)
+ exclusives.push([index, endIndex])
+ return [
+ { index, string: `<${tag + (attributes ? " " + attributes : "")}>`, endIndex, consumeStartCharacters: delimiterLength },
+ { index: endIndex, endIndex, string: `</${tag}>`, consumeEndCharacters: delimiterLength }
+ ]
+ }).filter(i => i)
+ }
-* This is my __custom__ *asterisk* parser.
+* This is my ¦sdf¦ __custom__ *asterisk* parser.
pageFooter
------------------------------------------------------------
commit 6baa4ba62e8d193d8677365a07c28a8011074189
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 10:58:34 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index 24af204..c7e3abb 100644
--- a/index.scroll
+++ b/index.scroll
@@ -9,7 +9,7 @@ printTitle
mediumColumns 1
customAsteriskParser
- extends abstractScrollParser
+ extends wrapsOnParser
crux *
javascript
compile() {return "⭐️⭐️" + this.content }
------------------------------------------------------------
commit 3be839cdaa5e18ed0b11e324fb9a7361015edcbd
Author: root <root@sand.scroll.pub>
Date: Thu Aug 1 10:16:19 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index b9815d8..24af204 100644
--- a/index.scroll
+++ b/index.scroll
@@ -10,7 +10,7 @@ mediumColumns 1
customAsteriskParser
extends abstractScrollParser
- cruxFromId
+ crux *
javascript
compile() {return "⭐️⭐️" + this.content }