Created
April 20, 2017 11:58
-
-
Save mynameislau/2c5bb88cfebd9181988fa3ee2ea318c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main -> stuff {% id %} | |
stuff -> itaStuff {% id %} | |
| textStuff {% id %} | |
textStuff -> text ita textStuff {% id %} | |
| text {% id %} | |
| null {% id %} | |
itaStuff -> ita text itaStuff {% id %} | |
| ita {% id %} | |
| null {% id %} | |
ita -> "*" text "*" {% ita %} | |
text -> [^*]:+ {% text %} | |
@{% | |
const typed = (type) => (data) => ({ type, data}) | |
const dataToString = data => data.join('').split(',').join(''); | |
const ita = (data, location, reject) => { | |
return `<i>${dataToString(data)}</i>`; | |
} | |
const text = (data, location, reject) => { | |
return `<p>${dataToString(data)}</p>`; | |
} | |
%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment