The above is the general usage of this library, but sometimes you can get your work done without converting text data to your own Rust data structure. [Converting to HTML is one of them](https://github.com/dochy-ksti/munyorunyoru/tree/master/src/samples/html_samples/sample4). 

Munyo language can be easily converted to HTML, and in this case, you don’t need to create enum variants for each HTML tag.
```
|| Set default type to "Text". In this case it's more redundant, but I want to show the functionality here
>>Text

|| ">\" means canceling default type, so the type of this line is "h3"
>\h3 Domain Specific Sample|class ribbon1

>\div|class balloon balloonL
	>\div|class balloon-img
		>\figure
			>\img|src girl.png
			>\figcaption Alice
	>\div|class balloon-text
		>\div|class balloon-text-inner

			|| This line doesn't have type, so default type "Text" is applied.
			I've arrived in Honolulu.

>\div|class balloon balloonR
	>\div|class balloon-img
		>\figure
			>\img|src boy.png
			>\figcaption Bob
	>\div|class balloon-text
		>\div|class balloon-text-inner
			I'm on the Moon!
```
It seems that writing in Munyo language directly to create HTML documents is as bad as HTML.

When we convert most tags as they are, and give "Alice" and "Bob" special treatment, the redundancy will be greatly reduced.
```
h3 Domain Specific Sample|class ribbon1

Alice I've arrived in Honolulu.
Bob I'm on the Moon!
Alice Let’s observe quantum entanglement and confirm the violation of Bell’s inequality.
Bob Let’s do it!

blockquote
	p GOD DOES NOT PLAY DICE WITH THE UNIVERSE.
	cite —Albert Einstein
```
It seems that only the first capital letter has been changed to lowercase, but this time, it was possible to create the cite tag that was not created last time with no code. In addition, the code has been simplified as follows.
```Rust
use std::collections::BTreeMap;
use crate::{samples::html_samples::html_builder::{HtmlItem, Param, Tag}, MunyoItem};

pub fn to_html_items(items : &[MunyoItem]) -> crate::Result<Vec<HtmlItem>>{
	let mut vec : Vec<HtmlItem> = Vec::with_capacity(items.len());
	for item in items{
		match item.typename.as_str(){
			"Alice" =>{
				if !item.children.is_empty(){
					Err("Alice can't contain children")?
				}
				if !item.params.is_empty(){
					Err("Alice can't contain params")?
				}
				vec.push(balloon(true, &item.argument));
			}
			"Bob" =>{
				if !item.children.is_empty(){
					Err("Bob can't contain children")?
				}
				if !item.params.is_empty(){
					Err("Bob can't contain params")?
				}
				vec.push(balloon(false, &item.argument));
			},
			_ =>{
				vec.push(tag(&item.typename, &item.argument, &item.params, &item.children)?)
			}
		}
	}
	Ok(vec)
}

fn balloon(is_l: bool, text: &str) -> HtmlItem {
    let bl = if is_l { "balloonL" } else { "balloonR" };
    let pict = if is_l { "girl.png" } else { "boy.png" };
    let speaker = if is_l { "Alice" } else { "Bob" };
    let t = format!(
        r###"
<div class="balloon {}">
  <div class="balloon-img"><figure><img src="{}" /><figcaption>{}</figcaption></figure></div>
  <div class="balloon-text"><div class="balloon-text-inner">
  {}
  </div></div>
</div>"###,
        bl, pict, speaker, text
    );
    HtmlItem::Text(t)
}

fn tag(tag_name: &str, argument : &str, params: &BTreeMap<String, String>, children: &[MunyoItem]) -> crate::Result<HtmlItem>{
	let mut children = to_html_items(children)?;
	if !argument.is_empty(){
		// The argument will be the first child which is text. Other children follow.
		children.insert(0,HtmlItem::Text(argument.to_string()));
	}
    Ok(HtmlItem::Tag(Tag::new(tag_name.to_string(), params.iter()
		.map(|(name,value)| Param::new(name.to_string(), value.to_string()))
		.collect()), children))
}
```