Documentation
This markdown has been created by Vikas Gola to know more about him Goto Vikas Gola .
- So what this documentation is?
This is just a simple tutorial or u can say how to use of markdown language with my code.
First thing I want to tell u before we start is this documentation is itself written using this markdown only
with it's powerfull syntax. The synatx for markdown in this documentation is in mostly italic for distinction.
Now, we can start...
- About the code and How to use - The code for this translator which translates the markdown into html is written in SML. Input for this can be given in function named as 'main'
and output file name can be given in SML by making a variable with name output (e.g. val output = "inputfilename"; ) or by changing variable "output" inside the code main.sml.
You can also give the give the csv file input which will auto detected and code will create table for that csv file.
The separator of csv file for default is '|'. You can also change it your convenience in main.sml.
The Code is well commented any one with good knowledge of Standard ML can understand it.
I mostly tried to build functions specific to their work. The name of functions are mostly relevent or mean to their work.
They tells what it does.
- Bold, Italic and Underline - You can do any word or phrase in bold style just wrapping it in double star **like this** .
Similarly to italic any word or phrase just wrape it with single star *like this* and to underline any word or phrase wrap it with underscore _like this_.
- Paragraph and Blockquote - Any line of words which are not part of anytype of lists (ordered or unordered)
surrounded by the at least blank lines will become the paragraph. The blockquotes are which block of lines have indentation more
from the surroundings and you can make blockquote by using this >(greater than sign) in front of each line as a first character.
You can also use recursive blockquotes which can be used by using more than >(greater than sign) in front of line.
Please note that you can't use the blockquotes inside lists as it will result into the finishing of list read more about lists in next sections. Examples...
> this is a example of single blockquote
>> this is recursive blockquotes.
- Headings - This markdown provides you the all the power of headings from html. Yes! you can use 6 type of headings
which have different sizes. Heading can be create by using the # in any line. As you will increase the number
# consecutively size of heading will decrease.
Examples:-
###### heading with smallest size
##### bigger than above heading
Will change into:-
heading with smallest size
bigger than above heading
- Ordered and Unordered lists - The ordered list is which you are seeing this documentation in.
- Every line which begins with number followed by dot without will be
a ordered list. The list items which have no blankspace markdown will have less space in between when it will convert into html.
Items with at least one blank line will have more space in between items. Every list item will be continued
till it has lines with indentation according to there depth.
- List items of unordered list should have -(minus sign) in front with one space followed.
Other syntax rules are mostly same for both lists. The great part is that you can make recursive lists with both.
Note:- Indentation should be in tabs.
- Links - You can create links in two ways first is automated whose links names will be link address and
it currently supports only the addresses which start with 'http' or 'https'.
e.g. <your link address> this will change into http://your link address/
The other links are which have names different then there link addresses and they can be created by this
[Google](http://www.google.com) which will convert into Google.
- HTML entities, Horizontal ruling and HTML tags - You can use anytype of characters for which you have type html entities name but
now u can use them as they are e.g To use ">" you have to type ">" but here you can use it as ">" it will automatically
converted to html entities.
You can even use direct html tags in htmls and they will not change. For example you can use <center> tag from html any where in the markdown
and it will not change in html.
Horizontal lines can be created by using consecutively at least three '-' like ---.
- Tables - You can give the csv file as input in main function which will detect that csv format and will create the table from that data
which will be visible in center of any browser. Tables can also be made in markdown using this synatx
<<
5|2|156
565|165|461
2123|12|138
>>
which will create table like this:-
5 | 2 | 156 |
565 | 165 | 461 |
2123 | 12 | 138 |
- More - Now, what if you want to use one of the syntax for your litteral. Don't worry I have a solution for this
you use the syntax related characters with blankspace and they will be shown as litteral.
e.g.
\[Link name](link address) now this will not convert in link.
\<<
5|2|156
565|165|461
2123|12|138
>> now this will not convert in table
\> now this will not create blockquote
\* this will not make text italic
\_ this will not make text underlined
\*\* this will not make text bold
\--- this will not make it into horizontal line
\# now this will not be heading.
and etc...
© copyright 2018-2019
facebok | Twitter | Github | Instagram | Linkdin