So deeply nesting a large property body is not recommended and also not suitable for encapsulating in there data.
3. An opening tag is opened being surrounded with the same signifier into the direction of the property body.
4. The closing tag is in the opposite direction same signifiers.
- - **[sesame[** I am an open and closed value now, nothing you can do about it (X|H)TML! **]sesame]**
+ - **[sesame[** I am an open and closed value now, nothing you can do about it (X|H)TML! **]sesame]**
3. The node characteristic is that each sub property is linked to its parent property
1. This is contained in the ' **@** ' attribute.
2. Node characteristic is also the tree can be searched via path.
1. The value of a property is delimited with an [ **#** ] tag as start, end [ **/#** ] as the ending.
1. Each property's start and end tag must stand and be on its own line, withing the body, except for the value or array attributes.
2. A value tagged property section is its text and can't contain further nested tree notes.
- Invalid: ```[#[<*<link/to/something>*>]#] ```
+ Invalid: ```[#[<*<link/to/something>*>]#]```
3. Tree can contain links to other various properties, anons, that means also to other trees then the current one.
- 1. A link (pointer) to an outside anon or property is specified in form of ⇾ ``` [*[ {path/name} ]*] ```.
+ 1. A link (pointer) to an outside anon or property is specified in form of ⇾ ```cnf [*[ {path/name} ]*]```.
1. The link can read only point to:
- A repository anon or constant value.
- A tree path value.
2. This is currently a TREE instruction only inbuilt option in Perl CNF, for the CNF Nodes individuals scripts order of processing.
4. Links in the root parent node of the tree are assigned as attributes or unique values. In subroperties they are set as own nodes.
4. Tree Format Example:
-
- ```CNF
- <<APP<My Nice Application by ACME Wolf PTY>>
-
- <<doc<TREE>
- <*<APP>*>
- thread: 28
- title = My Application
- <client<
- address: 192.168.1.64
- [paths[
- [#[
- ./dev
- ./sources
- ]#]
- ]paths]
- >client>
- >>
- ```
+ ```cnf
+ <<APP<My Nice Application by ACME Wolf PTY>>
+
+ <<doc<TREE>
+ <*<APP>*>
+ thread: 28
+ title = My Application
+ <client<
+ address: 192.168.1.64
+ [paths[
+ [#[
+ ./dev
+ ./sources
+ ]#]
+ ]paths]
+ >client>
+ >>
+ ```
## Sample Perl Language Usage
my $pret = ""; $pret = $1 if $1;
my $post = ""; $post = $4 if $4;
$tag = 'code'; $tag =$2 if $2;
- my $inline = $3; $inline = inlineCNF($inline,"");
+ my $inline = $3;
+ $inline = inlineCNF($inline,"");
my @code_tag = @{ setCodeTag($tag, "") };
$ln = qq($pret<$code_tag[1] class='$code_tag[0]'>$inline</$code_tag[1]>$post\n);
+ undef $tag;
if(!$pret && !$post){
$buff .= $ln; next;
+ }elsif($list_item){
+ my $new = HTMLListItem->new('dt', $ln, $list_item->{spc});
+ $list_item ->add($new);
+ next;
}
}
elsif($ln =~ /^\s*```(\w*)(.*)/){
$class = $code_tag[0];
$tag = $code_tag[1] if !$tag;
}
- if($code){
+ if($code>0){
if($para){
$bfCode .= "$para\n"
}
if(!$body){
$oo=$cc=""; $body=$v;$v=~/^(<+)/;$oo=$1 if$1;
if($v=~m/\[\#\[/){
- return "$spc<span ".C_PV.">[#[</span>"
+ my $r = "<span ".C_PV.">[#[</span>";
+ $v =~ s/\[\#\[/$r/g;
+ if($v =~ m/\]\#\]/){
+ $r = "<span ".C_PV.">]#]</span>";
+ $v =~ s/\]\#\]/$r/g;
+ }
+ return "$spc$v"
}
elsif($v=~m/\]\#\]/){
return "$spc<span ".C_PV.">]#]</span>"
elsif($v eq '>>'){
return "$spc<span ".C_B.">>></span>\n" }
else{
- $v=~/(>+\s*)$/;if($1){
- $v = $1; $v =~ s/>/>/g;
- return "$spc<span ".C_B.">$v</span>"
+ $v=~/(.*)(>+\s*)$/;
+ if(!$1 && $2){
+ $v = $2; $v =~ s/>/>/g;
+ return "$spc<span ".C_B.">$v</span>"
}else{
$oo =~ s/</</g;
if($v=~m/>>>/){
}elsif($v=~m/<<<(.*)/){
return "$spc<span ".C_B.">$oo</span><span ".C_PI.">$1</span>"
}elsif($v=~m/^(<{2,3})(.*?)([><])(.*)/){
- if($4){
- if($PARSER -> isReservedWord($4)){
- $v = "<span ".C_PI.">$4</span>"
+ my $t = "$1$2$3";
+ my $var = $2;
+ my $im = $3;
+ my $r = $4;
+ my $end =$4;
+ if($end){
+ my $changed = ($end =~ s/(>|<)$//g);
+ if($PARSER -> isReservedWord($end)){
+ $v = "<span ".C_PI.">$end</span>"; $v .= "<span ".C_B.">".($1 eq '<'?"<":">")."</span>" if $changed
}else{
- if (!$2){$v = "<span ".C_PA.">$4</span>"}else{$v=""}
+ if (!$var){$v = "<span ".C_PA.">$r</span>"}else{$v=""}
}
- my $t = "$1$2$3";
- my $r = $4;
- if($2 =~ /[@%]/){
+ if($var =~ /[@%]/){
if($r =~ /(.*)([><])(.*)/){
$v = "$spc<span ".C_B.">$t</span><span ".C_PA.">$1</span>";
$v .= "<span ".C_B.">$2</span>";
return $v;
}
}else{
- $v = "$spc<span ".C_B.">$oo</span><span ".C_PN.">$2</span><span ".C_B.">$3</span>$v";
+ $v = "$spc<span ".C_B.">$oo</span><span ".C_PN.">$var</span><span ".C_B.">$im</span>$v";
if($r =~ /(\w*)\s(.*)/){
return "$v<span ".C_PI.">$1</span> <span ".C_PV.">$2</span>$cc"
}else{
}
}
}
-elsif(!$oo && !$cc){
+
+if(!$oo && !$cc){
$body =~ m/ ^([\[<\#\*\[<]+) (.*?) ([\]>\#\*\]>]+)$ /gmx;
if($1&&$2&&$3){
$oo =~ s/</</g;
$cc =~ s/>/>/g;
}
- $body =~ m/ ([@%<]) ([\$@%]?\w+)? ([<>]) (.*) |
+ $body =~ m/ ([@%<]+) ([\$@%]?\w+)? ([<>]) (.*) |
([^<>]+) ([><])? (.*)
/gmx;
$oo =~ s/</</g;
$body =~ /(.*)([><])(.*)/;
if($1 && $2 && $3){
- $v = "<span ".C_B.">$oo</span><span ".C_PI.">$1</span><span ".C_B.">$2</span><span ".C_PV.">$3</span><span ".C_B.">$cc</span>"
+ $v = "<span ".C_B.">$oo</span><span ".C_PI.">$1</span><span ".C_B.">$2</span><span ".C_PV.">$3</span><span ".C_B.">$cc</span>"
}else{
- $v = "<span ".C_B.">$oo</span><span ".C_PI.">$body</span><span ".C_B.">$cc</span>"
+ $v = "<span ".C_B.">$oo</span><span ".C_PI.">$body</span><span ".C_B.">$cc</span>"
}
- }
+ }elsif($2){$v = "<span ".C_B.">$v</span>"}
return $spc.$v.$restIfAny
}
sub propValCNF($v){
- my @match = ($v =~ m/(.*)([=:])(.*)/gs);
+ my @match = ($v =~ m/([^:]+)([=:]+)(.*)/gs);
if(@match){
+ return " <span ".C_PI.">$1</span><span ".C_B.">$2</span><span ".C_PI.">$3</span>" if $2 eq '::';
return " <span ".C_PN.">$1</span><span class='O'>$2</span><span ".C_PV.">$3</span>"
}
elsif($v =~ /[><]/){
return "<span ".C_B.">$v</span>"
}else{
- return "<span ".C_PV.">$v</span>"
+ return "<code ".C_PV.">$v</code>"
}
return $v;
}
sub style ($script){
MarkdownPluginException->throw(error=>"Invalid argument passed as script!",show_trace=>1) if !$script;
#Links <https://duckduckgo.com>
- $script =~ s/<(http[:\/\w.]*)>/<a href=\"$1\">$1<\/a>/g;
- $script =~ s/(\*\*([^\*]*)\*\*)/\<em\>$2<\/em\>/gs;
- if($script =~m/[<\[]\*[<\[](.*)[\]>]\*[\]>]/){#It is a CNF link not part of standard Markup.
+ $script =~ s/<(http[:\/\w.]*)>/<a href=\"$1\">$1<\/a>/g;
+ $script =~ s/(\*\*([^\*]*)\*\*)/\<em\>$2<\/em\>/gs;
+ if($script =~ m/[<\[]\*[<\[](.*)[\]>]\*[\]>]/){#It is a CNF link not part of standard Markup.
my $link = $1;
my $find = $PARSER->obtainLink($link);
$find = $link if(!$find);