2017 © Pedro Peláez
 

library inml

inML - inline markup language

image

ptrofimov/inml

inML - inline markup language

  • Tuesday, December 25, 2012
  • by ptrofimov
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

inML - intuitive markup language

inML is concise and intuitive markup language. This repository contains description of inML markup language and PHP-written library and example script in order to render inML-formatted text into HTML and Text formats., (*1)

Basic inML -> HTML transformation rules

    1. Transforms paragraphs with style into HTML paragraphs with class:
.style            <p class="style">
Paragraph.   =>       Paragraph.
                  </p>
    1. Transforms lines with style into HTML spans with class:
.style Line        <span class="style">
OR            =>       Line
Line .style        </span>
    1. Transforms words with style into HTML spans with class:
                  <span class="style">
word.style   =>       word
                  </span>
    1. If parser finds styles equal HTML5 tags, it transforms them to corresponding tags (not classes):
.div.style        <div class="style">
Paragraph.   =>       Paragraph.
                  </div>
    1. You can define your own styles right in the document. Parser will automatically recognise type of style. For example, you can make a hyperlink by defining your own style with url:
inML.link is intuitive markup language.        
                                          =>   <a href="https://github.com/ptrofimov/inml">inML</a>
#link https://github.com/ptrofimov/inml            is intuitive markup language.

Example with screenshots

inML-formatted text:, (*2)

.h1 inML - inline markup language

.i
inML.b is simple and compact markup
that could be easily transformed into HTML.b

.b Key points:

.ul
.li Easy text formatting
.li Traditional embedded HTML.b styles
.li Ability to add user styles

transforms into HTML:, (*3)

<p>
    <h1>inML - inline markup language</h1>
</p>
<i>
    <b>inML</b> is simple and compact markup
        that could be easily transformed into <b>HTML</b>
</i>
<p>
    <b>Key points:</b>
</p>
<ul>
    <li>Easy text formatting</li>
    <li>Traditional embedded <b>HTML</b> styles</li>
    <li>Ability to add user styles</li>
</ul>

and looks like this (with predefined CSS styles):, (*4)

Example inML to HTML transformation, (*5)

Installation and usage

    1. Install composer if need.
    1. Create composer.json or add dependency:
{
   "require":{
       "ptrofimov/inml":"*"
   }
}
    1. Install package:
composer install
    1. Usage example:
use \Inml\Text;
use \Inml\Render\Html;

$html = (new Html)->render(new Text($inml));
    1. Enjoy!

The Versions

25/12 2012

dev-master

9999999-dev

inML - inline markup language

  Sources   Download

The Requires

  • php >=5.4