Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lib/from-sigil-link.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
var fs = require('fs')
var ohm = require('ohm-js')
var path = require('path')

const grammarPath = path.join(__dirname, './grammar/ssb-sigil-link.ohm')
var g = ohm.grammar(fs.readFileSync(grammarPath))
var g = ohm.grammar(require('./grammar/ssb-sigil-link.ohm'))

const sigils = {
'@': 'feed',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = `
ssbSigilLink {

sigilLink = sigil base64 "." commonAlgorithm
Expand All @@ -14,3 +15,4 @@ ssbSigilLink {
| "="
)*
}
`
2 changes: 2 additions & 0 deletions lib/grammar/ssb-uri.ohm → lib/grammar/ssb-uri.ohm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = `
ssbURI {

uriCommon =
Expand All @@ -20,3 +21,4 @@ ssbURI {
base64 = alnum | "-" | "_" | "="

}
`
5 changes: 1 addition & 4 deletions lib/to-sigil-link.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
var fs = require('fs')
var path = require('path')
var ohm = require('ohm-js')

const grammarPath = path.join(__dirname, './grammar/ssb-uri.ohm')
var g = ohm.grammar(fs.readFileSync(grammarPath))
var g = ohm.grammar(require('./grammar/ssb-uri.ohm'))

const sigils = {
feed: '@',
Expand Down