ishafayet / cohtml Goto Github PK
View Code? Open in Web Editor NEWCohtml is a declarative markup language with ruby/coffee-script like syntax that transpiles to and from Html.
License: MIT License
Cohtml is a declarative markup language with ruby/coffee-script like syntax that transpiles to and from Html.
License: MIT License
div | cohtml <b>is</b> interesting.
should compile to
<div>cohtml<b>is</b>interesting.</div>
but
div |! cohtml <b>is</b> interesting.
should compile to
<div>cohtml<b>is</b>interesting.</div>
Add a new kind of block string that preserves the newlines and whitespace.
i.e.
div ```My name is dan.
And I enter whitespace for no reasons. ```
should transpile to
<div>My name is dan.<br> And I enter whitespace for no reasons. </div>
One of the core ideas behind cohtml was to make it extensible in such a manner that it's code can be reused in other projects that seek to extend cohtml. (For example, my project 'copolymer' which adds in support for native conditional like if
for
etc in cohtml and transpiles to a polymer web-component)
We need to modify the api in such a way that it can be easily extended and reused.
The code needs to be separated into more chunks.
Charset needs to be updated. Both special characters are/were used in polymer.
The following compiles successfully
!doctype html
html lang="en"
head
title | Cohtml Demo
body
h1 | Cohtml Demo
However the following doesn't
!doctype html
html lang="en"
head
title | Cohtml Demo
body
h1 | Cohtml Demo
Inline styles can have shorthands so that they can be easily identified and typed. Round braces can be a good way to inline styles.
div$myId someattr="someValue" (color:red) | some text
can transpile to
<div id="myId" someattr="someValue" style="color:red">some text</div>
Only way to make sure that this does not happen is by thorough unit testing.
[https://github.com/iShafayet/cohtml/blob/master/docs/dev-notes/cohtml-grammar.md]
It is as of now, just somehow gets the job done. Some expert opinion or contribution would be nice.
https://github.com/iShafayet/cohtml/blob/master/docs/dev-notes/html5-grammar.md
Just like
div
`cohtml`
b | is
`interesting.`
this
div
| cohtml
b | is
| interesting.
should compile to
<div>cohtml<b>is</b>interesting.</div>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.