r2696
r2597
1[[분류:냥]]
r2684
2
r2696
3{{{+1 {{{+1 +1+1 > 14.25 * 1.28889 * 1.28889 => 23.67259259300074px}}}}}}
4{{{+2 +2 > 14.25 * 1.38889 => 19.791666666825px}}}
5
6||<tablebgcolor=transparent><rowbgcolor=#00a495><rowcolor=#fff> 입력 || 출력 || 적용 크기 || 입력 || 출력 || 적용 크기 ||
7|| {{{기본}}} || 기본 ||1.00000em || {{{기본}}} || 기본 ||1.00000em ||
8|| {{{{{{+1 +1단계}}}}}} || {{{+1 +1단계}}} ||1.28889em || {{{{{{-1 -1단계}}}}}} || {{{-1 -1단계}}} ||0.92589em ||
9|| {{{{{{+2 +2단계}}}}}} || {{{+2 +2단계}}} ||1.38889em || {{{{{{-2 -2단계}}}}}} || {{{-2 -2단계}}} ||0.83333em ||
10|| {{{{{{+3 +3단계}}}}}} || {{{+3 +3단계}}} ||1.48144em || {{{{{{-3 -3단계}}}}}} || {{{-3 -3단계}}} ||0.74067em ||
11|| {{{{{{+4 +4단계}}}}}} || {{{+4 +4단계}}} ||1.57400em || {{{{{{-4 -4단계}}}}}} || {{{-4 -4단계}}} ||0.64811em ||
12|| {{{{{{+5 +5단계}}}}}} || {{{+5 +5단계}}} ||1.66667em || {{{{{{-5 -5단계}}}}}} || {{{-5 -5단계}}} ||0.62222em ||
13||<-6><bgcolor=#00a495><color=#fff> 응용 ||
14||<-3> {{{{{{+5 {{{+5 +5+5단계}}}}}}}}} ||<-3> {{{+5 {{{+5 +5+5단계}}}}}} ||
15[include(틀:문서 가져옴/the seed, 위키=나, 문서명=나무위키:문법 도움말, 버전=882, UUID=0c47b950-9eec-41ba-a39b-e66d937d52b9)]
16
r2682
17{{{#!if ap=5, bp=0, bb=""
18}}}{{{#!if ap-bp>=9
19{{{#!if bp+=9, bb=bb+"000000000"
20}}}}}}{{{#!if ap-bp>=4
21{{{#!if bp+=4, bb=bb+"0000"
22}}}}}}{{{#!if ap-bp>=2
23{{{#!if bp+=2, bb=bb+"00"
24}}}}}}{{{#!if ap-bp>=2
25{{{#!if bp+=2, bb=bb+"00"
26}}}}}}{{{#!if ap-bp>=1
27{{{#!if bp+=1, bb=bb+"0"
28}}}}}}
29@ap@ @bp@
30{{{#!if bl = bb.length
31}}}@bl@자
32----
33{{{#!if ap=5, bp=0, bb=""
34}}}{{{#!if ap>bp
35{{{#!if bp=ap, bb+="000000000000000000"
36}}}{{{#!if bb=bb.substr(0,ap)
37}}}}}}
38@ap@ @bp@
39{{{#!if bl = bb.length
40}}}@bl@자
41##
r2662
42||<#fff"> <#fff'''{{{#red \"}}}'''>왜 문제가 없지 ||
r2629
43##
44folding, wiki(스타일), html은 뒤에 띄어쓰기 없어도 작동.
45다만 dark-style은 꼭 "-"만 사용 가능.
46if, syntax는 띄어쓰기 없을 시 에러.
47##
r2624
48== 문단 ==
r2671
49{{{#!folding 계산기 테스트
r2636
50{{{-5
r2643
51[include(틀:계산기2, a=1.1, f=-, b=-1.2)]
r2637
52[include(틀:계산기2, a=9223372036854775808, f=-, b=-9223372036854775800)]
r2636
53[include(틀:계산기2, a=., f=-, b=-.)]
54[include(틀:계산기2, a=-, f=+, b=-)]
55[include(틀:계산기2, a=10, f=/, b=3)]
r2624
56[include(틀:계산기2, a=-5, f=/, b=200)]
57[include(틀:계산기2, a=-5, f=*, b=200)]
58[include(틀:계산기2, a=123459, f=/, b=2)]
59[include(틀:계산기2, a=12345, f=-, b=67890)]
r2630
60[include(틀:계산기2, a=123456789012345678, f=-, b=-901234567890123456)]
r2632
61[include(틀:계산기2, a=123456789012345678.901234567890123456, f=+, b=789012345678901234.567890123456789012)]
r2639
62[include(틀:계산기2, a=123456789012345678.9012345678901234567, f=+, b=789012345678901234.567890123456789012)]
r2624
63[include(틀:계산기2, a=-1, f=*, b=-5)]
64[include(틀:계산기2, a=-3, f=/, b=7)]
r2633
65[include(틀:계산기2, a=1.1, f=+, b=0.1)]
r2634
66[include(틀:계산기2, a=1.123, f=+, b=0.877)]
67[include(틀:계산기2, a=1.123, f=+, b=0.878)]
r2635
68[include(틀:계산기2, a=1.333, f=-, b=4.354)]
r2638
69[include(틀:계산기2, a=7.89, f=-, b=12.345)]
r2640
70[include(틀:계산기2, a=1, f=-, b=0.000000000000000001)]
r2691
71[include(틀:계산기2, a=0.999999999999999999, f=+, b=0.000000000000000001)]
r2692
72[include(틀:계산기2, a=1.000000000000000002, f=-, b=2.000000000000000001)]
r2694
73[include(틀:계산기2, a=100000000000000000, f=*, b=100000000000000000)]
r2693
74[include(틀:계산기2, a=123456789012345678, f=*, b=789012345678901234)]
r2695
75[include(틀:계산기2, a=123456789012345678.901234567890123456, f=*, b=789012345678901234.567890123456789012)]
76[include(틀:계산기2, a=0, f=*, b=789012345678901234.567890123456789012)]}}}
r2671
77아직은 소수끼리의 계산은 되지 않는 모양이다. 사실 그도 그럴 것이 gauss함수를 가져오지 않았기 때문)}}}
r2624
78
79{{{#!if json={'a':'b', 'c':'d'}
80json={'a':'b', 'c':'d'}[br]
81}}}{{{#!if json['a'] == 'b'
82json['a'] == 'b'[br]
83}}}{{{#!if list = ['a', 'b']
84list = ['a', 'b'][br]
85}}}{{{#!if list[1] == 'b'
86list[1] == 'b'[br]
87}}}
88
89[[../냥]] < 볼드체. 단, {{{../}}}뒤에 붙는 이름이 자기자신과 같은 이름이면 볼드체, 다른 이름(예 : [[../냥냥]], [[../냥/냥]])이면 볼드체가 아니다. 문서명이 '[[냥/냥|(상위문서명)/냥]]'일 경우에도 볼드체가 된다. 이 문서에는 상위 문서가 없으니 그냥 '냥' 으로 링크되는 듯 하다.
90[[냥#]] < 볼드체
91[[냥#ㅁㄴㅇㄹ|냥#ㅁㄴㅇㄹ]] < 볼드체아님
92[[문서:냥]] < 볼드체아님
93
94[include(틀:계산기, r=13)]
95\[include(틀:계산기, r=13)]
96생각해보니까 그냥 r을 지정할 수도 있겠구나
97[include(틀:계산기, a=123456789, f=+, b=1)]
98[include(틀:계산기, a=123456789, f=-, b=1)]
99[include(틀:계산기, a=123459, f=*, b=2)]
100[include(틀:계산기, a=123459, f=/, b=2)]
r2646
101== 그래프구상 ==
102{{{#!if i=0, x=0
r2648
103}}}<math>x^2</math>
r2646
104{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
105}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
106}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
107}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
108}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
109}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
110}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
111}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
112}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
113}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
114}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
115}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
116}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
117}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
118}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
119}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
120}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
121}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
122}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
123}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
124}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
125}}}{{{#!if x1 = i**2, x2 = (i+1)**2, this['y'+i]=(x2-x1), this['v'+i]=x1, i+=1
r2652
126}}}{{{#!if true
r2669
127#tk : thickness (px) ; wd : width (px)
128{{{#!if tk=1+0.0, color="#666", wd=10+0.0
129}}}}}}{{{#!if tk=(+tk)/2, tk=tk.toString(), dis="display: inline-table; background: linear-gradient", rb="to right bottom", rt="to right top", tp="transparent", c1="calc(50% - "+tk+"px)", c2="calc(50% + "+tk+"px)", c3=tp+" "+c1+", "+color+" "+c1+" "+c2+", "+tp+" "+c2, hg="height: ", wd=wd.toString(), wdx="width: "+wd+"px", vag="vertical-align: calc"
r2646
130}}}
r2669
131{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y1@px; @wdx@; @vag@(@v1@px + @tk@px)"
132}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y2@px; @wdx@; @vag@(@v2@px + @tk@px);"
133}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y3@px; @wdx@; @vag@(@v3@px + @tk@px);"
r2670
134}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y4@px; @wdx@; @vag@(@v4@px + @tk@px);"
135}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y5@px; @wdx@; @vag@(@v5@px + @tk@px);"
136}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y6@px; @wdx@; @vag@(@v6@px + @tk@px);"
137}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y7@px; @wdx@; @vag@(@v7@px + @tk@px);"
138}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y8@px; @wdx@; @vag@(@v8@px + @tk@px);"
139}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y9@px; @wdx@; @vag@(@v9@px + @tk@px);"
140}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y10@px; @wdx@; @vag@(@v10@px + @tk@px)"
141}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y11@px; @wdx@; @vag@(@v11@px + @tk@px)"
142}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y12@px; @wdx@; @vag@(@v12@px + @tk@px)"
143}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y13@px; @wdx@; @vag@(@v13@px + @tk@px)"
144}}}{{{#!wiki style="@dis@(@rb@, @c3@); @hg@@y14@px; @wdx@; @vag@(@v14@px + @tk@px)"
r2646
145}}}
r2624
146
r2657
147== 나무나무마크구상 ==
r2681
148 * 할거 > 분류
r2680

(r2677으로 되돌림)
149## \{{{#!html <div style="clear: both"/>}}}
150## == clearfix
151input={{{냥[[링크|냥]]냥[[https://namu.wiki/w/사용자:nyangx3|냥]]냥}}}
152{{{#!wiki style="display: none"
153{{{#!if input='냥[[링크|냥]]냥[[https://namu.wiki/w/사용자:nyangx3|냥]]냥'
r2657
154}}}
r2680

(r2677으로 되돌림)
155{{{#!if href = null, linkPrint = null, break = false, linkColor='#0275d8', outLink=''
156}}}{{{#!if linkOpen = input.indexOf('[['), linkClose = input.indexOf(']]')
r2674
157}}}{{{#!if linkRaw = input.substring(linkOpen, linkClose+2)
158}}}{{{#!if linkOpen != -1 && linkClose != -1 && linkOpen+2 < linkClose
159## [[]] 인 경우 linkOpen+2 == linkClose 임 ^^^^^^^^^^^^^^^^^^^^^^
160 {{{#!if divider = linkRaw.indexOf('|')
161 }}}{{{#!if divider == -1
162##[[링크]]
163 {{{#!if href = linkRaw.substring(2, linkRaw.length-2)
164 }}}
165 }}}{{{#!if divider != -1
166 {{{#!if (divider == 2) && (divider+1 == linkRaw.length-2)
167 {{{#!if break = true, input = input.substring(0, linkOpen) + input.substring(linkClose+2)
168##[[|]] > 출력 x
169 }}}
170 }}}
171 {{{#!if (divider == 2) && !break
172 {{{#!if break = true, href = linkRaw.substring(divider+1, linkRaw.length-2), linkPrint = href
173##[[|링크]], 원래는 자기 자신을 링크하지만 그건 귀찮으니 그냥 입력받은 값을 출력하기로.
174 }}}
175 }}}
176 {{{#!if (divider+1 == linkRaw.length-2) && !break
177##[[링크|]], 원래는 자기 자신을 링크하지만 그건 귀찮으니 그냥 입력받은 값을 출력하기로.
178 {{{#!if break = true, href = linkRaw.substring(2, divider), linkPrint = href
179 @linkPrint@
180 @href@
181 }}}
182 }}}
183 {{{#!if !break
184 {{{#!if href = linkRaw.substring(2, divider), linkPrint = linkRaw.substring(divider+1, linkRaw.length-2)
185 }}}
186 }}}
187 }}}
188 {{{#!if isLink = (href.startsWith('https://') || href.startsWith('http://') || href.startsWith('ftp://')), isLink
r2680

(r2677으로 되돌림)
189 {{{#!if linkColor = 'none', outLink = 'asdf'
r2674
190 }}}
191 }}}{{{#!if isCategory = (href.startsWith('분류:')), isCategory
192## 나중에생각 - 실제로 분류되지는 않고(하고 싶어도 못 함 display: none으로 없어지는 것도 아니고) 그냥 분류 느낌만 내기
193 }}}{{{#!if !(isCategory || isLink)
194 {{{#!if href = 'https://theseed.io/w/'+href
195 }}}
r2680

(r2677으로 되돌림)
196 }}}{{{#!if input = input.substring(0, linkOpen) + '<div style="display: inline-table"><div style="overflow: hidden"><div style="margin-left: -1.2em' + outLink + '"><a href="' + href + '"><div style="color: ' + linkColor + '; display: inline">' + linkPrint + '</div></a></div></div></div>' + input.substring(linkClose + 2)
r2674
197 }}}
r2657
198}}}
r2680

(r2677으로 되돌림)
199###########
200{{{#!if h=null,a=null,b=false,c='#0275d8',d=''
201}}}{{{#!if e=input.indexOf('[['),x=input.indexOf(']]')
202}}}{{{#!if z=input.substring(e,x+2)
203}}}{{{#!if e!=-1&&x!=-1&&e+2<x
204{{{#!if g=z.indexOf('|')
205}}}{{{#!if g==-1
206{{{#!if h=z.substring(2,z.length-2)
207}}}}}}{{{#!if g!=-1
208{{{#!if (g==2)&&(g+1==z.length-2)
209{{{#!if b=true,input=input.substring(0,e)+input.substring(x+2)
210}}}}}}{{{#!if (g==2)&&!b
211{{{#!if b=true,h=z.substring(g+1,z.length-2),a=h
212}}}}}}{{{#!if (g+1==z.length-2)&&!b
213{{{#!if b=true,h=z.substring(2,g),a=h
214}}}}}}{{{#!if !b
215{{{#!if h=z.substring(2,g),a=z.substring(g+1,z.length-2)
216}}}}}}}}}{{{#!if isLink=(h.startsWith('https://')||h.startsWith('http://')||h.startsWith('ftp://')),isLink
217{{{#!if c='none',d='asdf'
218}}}}}}{{{#!if isCategory=(h.startsWith('분류:')),isCategory
219}}}{{{#!if !(isCategory||isLink)
220{{{#!if h='https://theseed.io/w/'+h
221}}}}}}{{{#!if input=input.substring(0,e)+'<div style="display:inline-table"><div style="overflow:hidden"><div style="margin-left:-1.2em'+d+'"><a href="'+h+'"><div style="color:'+c+';display:inline">'+a+'</div></a></div></div></div>'+input.substring(x+2)
222}}}}}}
223}}}
224output: {{{#!html @input@}}}
r2681
225
226== 나무나무마크구상2 ==
227할거 : wiki/darkstyle/+/-/#fff
228리터럴귀찮음 if folding syntax는 될리가없음
r2688
229input='냥\{\{\{#!html 냥<div style="color: red; display: inline">냥</div>\}\}\}냥\{\{\{#!wiki style="color: blue; display: inline"<br>냥텍스트\}\}\}asdf\{\{\{#;color:red,#f00 asdf\}\}\}'
r2681
230##괄호를 ) 를 찾고 (를 나중에 찾는 방식이라(이게 로직이 더 간단함 근데 처리부분 길어지면 바꿀수도) input에 다른 거 오면 창남ㅇㅇ
231
232{{{#!wiki style="display: none"
r2688
233{{{#!if input='냥\{\{\{#!html 냥<div style="color: red; display: inline">냥</div>\}\}\}냥\{\{\{#!wiki style="color: blue; display: inline"<br>냥텍스트\}\}\}asdf\{\{\{#;color:red,#f00 asdf\}\}\}'
r2690
234}}}
235##############################
236{{{#!if ParClose=input.indexOf('\}\}\}'), ParOpen=input.indexOf('\{\{\{'), Match=false, true
r2681
237 {{{#!if ParClose!=-1&&ParOpen!=-1&&ParClose>ParOpen
238 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
239 }}}
240 {{{#!if _ParOpen == -1
241 {{{#!if Match=true
242 }}}
243 }}}{{{#!if _ParOpen != -1
244 {{{#!if ParOpen=_ParOpen
245 }}}
246 }}}
247############################
248 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
249 }}}
250 {{{#!if _ParOpen == -1
251 {{{#!if Match=true
252 }}}
253 }}}{{{#!if _ParOpen != -1
254 {{{#!if ParOpen+=_ParOpen+3
255 }}}
256 }}}
257############################
258 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
259 }}}
260 {{{#!if _ParOpen == -1
261 {{{#!if Match=true
262 }}}
263 }}}{{{#!if _ParOpen != -1
264 {{{#!if ParOpen+=_ParOpen+3
265 }}}
266 }}}
267 }}}
r2686
268###########################
r2681
269 {{{#!if Match
r2688
270 {{{#!if input.substr(ParOpen, 9) == '\{\{\{#!html'
r2686
271 {{{#!if input = input.substring(0,ParOpen)+input.substring(ParOpen+9,ParClose).trim()+input.substr(ParClose+3)
272 }}}
273 }}}
r2688
274 {{{#!if input.substr(ParOpen, 9) == '\{\{\{#!wiki'
r2687
275 {{{#!if BrL = input.substring(ParOpen,ParClose).indexOf('<br>'), StyleL = input.substring(ParOpen,ParClose).indexOf('style=')
276 }}}{{{#!if BrL != -1 && StyleL!=-1
277 {{{#!if Text = input.substring(ParOpen+BrL+4,ParClose), Style=input.substr(ParOpen+StyleL,BrL-StyleL)
278 }}}{{{#!if input = input.substring(0,ParOpen)+'<div '+Style+'>'+Text.trim()+'</div>'+input.substr(ParClose+3)
279 }}}
280 }}}
281 }}}
r2690
282 {{{#!if input.substr(ParOpen, 4) == '\{\{\{#'
283 {{{#!if Blank = input.substring(ParOpen,ParClose).indexOf(' '), Comma = input.substring(ParOpen,ParClose).indexOf(',')
284 }}}{{{#!if Blank!=-1
285 {{{#!if Comma != -1
286 {{{#!if WhiteColor=input.substr(ParOpen+3,Comma-3), DarkColor=input.substring(ParOpen+Comma+1,ParOpen+Blank)
287 }}}
288 }}}
289 {{{#!if Comma == -1
290 {{{#!if WhiteColor=input.substr(ParOpen+3,Blank-3), DarkColor=WhiteColor
291 }}}
292 }}}{{{#!if Text = input.substring(ParOpen+Blank,ParClose)
293 }}}{{{#!if input = input.substring(0,ParOpen)+'<div style="display: inline; color: '+WhiteColor+'">'+Text.trim()+'</div>'+input.substr(ParClose+3)
294##유효성 검사는 뺌. 귀찮고 넣으면 길어짐.
295 }}}
296 }}}
297 }}}
r2681
298 }}}
r2686
299}}}
r2690
300##############################
r2686
301{{{#!if ParClose=input.indexOf('\}\}\}'), ParOpen=input.indexOf('\{\{\{'), Match=false, true
r2681
302 {{{#!if ParClose!=-1&&ParOpen!=-1&&ParClose>ParOpen
303 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
304 }}}
305 {{{#!if _ParOpen == -1
306 {{{#!if Match=true
307 }}}
308 }}}{{{#!if _ParOpen != -1
309 {{{#!if ParOpen=_ParOpen
310 }}}
311 }}}
312############################
313 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
314 }}}
315 {{{#!if _ParOpen == -1
316 {{{#!if Match=true
317 }}}
318 }}}{{{#!if _ParOpen != -1
319 {{{#!if ParOpen+=_ParOpen+3
320 }}}
321 }}}
322############################
323 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
324 }}}
325 {{{#!if _ParOpen == -1
326 {{{#!if Match=true
327 }}}
328 }}}{{{#!if _ParOpen != -1
329 {{{#!if ParOpen+=_ParOpen+3
330 }}}
331 }}}
332 }}}
r2686
333###########################
r2681
334 {{{#!if Match
r2688
335 {{{#!if input.substr(ParOpen, 9) == '\{\{\{#!html'
r2686
336 {{{#!if input = input.substring(0,ParOpen)+input.substring(ParOpen+9,ParClose).trim()+input.substr(ParClose+3)
337 }}}
r2681
338 }}}
r2688
339 {{{#!if input.substr(ParOpen, 9) == '\{\{\{#!wiki'
r2687
340 {{{#!if BrL = input.substring(ParOpen,ParClose).indexOf('<br>'), StyleL = input.substring(ParOpen,ParClose).indexOf('style=')
341 }}}{{{#!if BrL != -1 && StyleL!=-1
342 {{{#!if Text = input.substring(ParOpen+BrL+4,ParClose), Style=input.substr(ParOpen+StyleL,BrL-StyleL)
343 }}}{{{#!if input = input.substring(0,ParOpen)+'<div '+Style+'>'+Text.trim()+'</div>'+input.substr(ParClose+3)
344 }}}
r2681
345 }}}
346 }}}
r2690
347 {{{#!if input.substr(ParOpen, 4) == '\{\{\{#'
348 {{{#!if Blank = input.substring(ParOpen,ParClose).indexOf(' '), Comma = input.substring(ParOpen,ParClose).indexOf(',')
349 }}}{{{#!if Blank!=-1
350 {{{#!if Comma != -1
351 {{{#!if WhiteColor=input.substr(ParOpen+3,Comma-3), DarkColor=input.substring(ParOpen+Comma+1,ParOpen+Blank)
352 }}}
353 }}}
354 {{{#!if Comma == -1
355 {{{#!if WhiteColor=input.substr(ParOpen+3,Blank-3), DarkColor=WhiteColor
356 }}}
357 }}}{{{#!if Text = input.substring(ParOpen+Blank,ParClose)
358 }}}{{{#!if input = input.substring(0,ParOpen)+'<div style="display: inline; color: '+WhiteColor+'">'+Text.trim()+'</div>'+input.substr(ParClose+3)
359##유효성 검사는 뺌. 귀찮고 넣으면 길어짐.
360 }}}
361 }}}
362 }}}
r2681
363 }}}
r2686
364}}}
365##############################
r2688
366{{{#!if ParClose=input.indexOf('\}\}\}'), ParOpen=input.indexOf('\{\{\{'), Match=false, true
367 {{{#!if ParClose!=-1&&ParOpen!=-1&&ParClose>ParOpen
368 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
369 }}}
370 {{{#!if _ParOpen == -1
371 {{{#!if Match=true
372 }}}
373 }}}{{{#!if _ParOpen != -1
374 {{{#!if ParOpen=_ParOpen
375 }}}
376 }}}
377############################
378 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
379 }}}
380 {{{#!if _ParOpen == -1
381 {{{#!if Match=true
382 }}}
383 }}}{{{#!if _ParOpen != -1
384 {{{#!if ParOpen+=_ParOpen+3
385 }}}
386 }}}
387############################
388 {{{#!if _ParOpen = input.substring(ParOpen+3,ParClose).indexOf('\{\{\{')
389 }}}
390 {{{#!if _ParOpen == -1
391 {{{#!if Match=true
392 }}}
393 }}}{{{#!if _ParOpen != -1
394 {{{#!if ParOpen+=_ParOpen+3
395 }}}
396 }}}
397 }}}
398###########################
399 {{{#!if Match
400 {{{#!if input.substr(ParOpen, 9) == '\{\{\{#!html'
401 {{{#!if input = input.substring(0,ParOpen)+input.substring(ParOpen+9,ParClose).trim()+input.substr(ParClose+3)
402 }}}
403 }}}
404 {{{#!if input.substr(ParOpen, 9) == '\{\{\{#!wiki'
405 {{{#!if BrL = input.substring(ParOpen,ParClose).indexOf('<br>'), StyleL = input.substring(ParOpen,ParClose).indexOf('style=')
406 }}}{{{#!if BrL != -1 && StyleL!=-1
407 {{{#!if Text = input.substring(ParOpen+BrL+4,ParClose), Style=input.substr(ParOpen+StyleL,BrL-StyleL)
408 }}}{{{#!if input = input.substring(0,ParOpen)+'<div '+Style+'>'+Text.trim()+'</div>'+input.substr(ParClose+3)
409 }}}
410 }}}
411 }}}
412 {{{#!if input.substr(ParOpen, 4) == '\{\{\{#'
413 {{{#!if Blank = input.substring(ParOpen,ParClose).indexOf(' '), Comma = input.substring(ParOpen,ParClose).indexOf(',')
414 }}}{{{#!if Blank!=-1
415 {{{#!if Comma != -1
416 {{{#!if WhiteColor=input.substr(ParOpen+3,Comma-3), DarkColor=input.substring(ParOpen+Comma+1,ParOpen+Blank)
417 }}}
418 }}}
419 {{{#!if Comma == -1
420 {{{#!if WhiteColor=input.substr(ParOpen+3,Blank-3), DarkColor=WhiteColor
421 }}}
422 }}}{{{#!if Text = input.substring(ParOpen+Blank,ParClose)
423 }}}{{{#!if input = input.substring(0,ParOpen)+'<div style="display: inline; color: '+WhiteColor+'">'+Text.trim()+'</div>'+input.substr(ParClose+3)
424##유효성 검사는 뺌. 귀찮고 넣으면 길어짐.
425 }}}
426 }}}
427 }}}
428 }}}
r2687
429}}}
r2688
430###########################
r2689
431}}}
r2688
432
r2681
433output: {{{#!html @input@}}}
r2624
434== ㅁㄴㅇㄹ ==
435[include(a)]''''''[include(a)][include(a)]
436[[]][include(a)][include(a)][include(a)]
437
438{{{#!wiki style="background: skyblue; margin: 0 auto; padding: 5px; max-width: 500px"
439||<tablealign=center><tablewidth=100%><tablebordercolor=transparent><tablebgcolor=red><bgcolor=#000>||
440
441||<tablealign=center><tablewidth=100%><tablebordercolor=transparent><tablebgcolor=red><rowbgcolor=#000>||
442||<colbgcolor=#000>||
443||<tan>||
444
445||<tablealign=center><tablewidth=100%><bgcolor=#000>||
446
447||<tablealign=center><tablewidth=100%>||}}}
448Mozilla/5.0 (compatible; Daum/1.0; +http://ws.daum.net/aboutkr.html) ok
449Mozilla/5.0 (compatible; coccocbot-web/1.0; +http://help.coccoc.com/web) ok
450\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961)]
451[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961)]
452----
453\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961, uuid=2d701244-1d84-4716-8717-e0756914096d)]
454[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961, uuid=2d701244-1d84-4716-8717-e0756914096d)]
455----
456\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=-1, UUID=2d701244-1d84-4716-8717-e07569140961)]
457[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=-1, UUID=2d701244-1d84-4716-8717-e07569140961)]
458----
459\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=)]
460[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=)]
461----
462\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e0756914096x)]
463[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e0756914096x)]
464----
465\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961)]
466[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e07569140961)]
467----
468\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e0756914096x)]
469[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, UUID=2d701244-1d84-4716-8717-e0756914096x)]
470----
471\[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961, UUID=2d701244-1d84-4716-8717-e07569140961)]
472[include(틀:문서 가져옴/the seed, 위키=더, 문서명=검색, 버전=32, uuid=2d701244-1d84-4716-8717-e07569140961, UUID=2d701244-1d84-4716-8717-e07569140961)]
473----
474\[include(틀:isuuid, uuid=1dd4a127-1b8d-4788-8cea-9ff8b1ddd06e)]
475[include(틀:isuuid, uuid=1dd4a127-1b8d-4788-8cea-9ff8b1ddd06e)]
476----
477\[include(틀:isuuid, uuid=xdd4a127-1b8d-4788-8cea-9ff8b1ddd0xx)]
478[include(틀:isuuid, uuid=xdd4a127-1b8d-4788-8cea-9ff8b1ddd0xx)]
479\[include(틀:isuuid, uuid=냥)]
480[include(틀:isuuid, uuid=냥)]
481[include(틀:ㅁ, str=Hello\, World!)]
482toString() 가능
483parseInt() x
484
485== ==
r2584
486{{{#!wiki style="font-weight: 300; font-size: 20px"
487{{{#!if 식 = '11+2'
r2597
488@식=11+2@}}} = {{{#!if s1=false, s2=false, s3=false, j=1+0, i=0+0, k=1+0
r2593
489##switch1 : 숫자 계속 탐색하기, switch2 : 소수점 아래 기입하기. switch3 : 중복 실행 방지.
r2594
490}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
r2593
491}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
r2594
492##숫자를 발견할 경우
r2591
493{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
r2595
494##여기에 앞자리가 음수냐 아니냐를 읽는 판별을 만들어야 합니다. ㅏ 이걸 생각 못했네요 그럼 좀 많이 길어지는데
r2591
495}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
496##숫자를 계속 발견할 경우 (소수점일 수도 있습니다. 여기서는 숫자일 경우)
r2592
497##여기에서 소수점 위를 기입하냐 소수점 아래를 기입하냐 소수점 아래라면 소수점 아래 몇번째 자리를 기입하느냐를 적어야 합니다.
r2597
498{{{#!if s2==false
499##정수 자리를 기입하는 경우
r2595
500{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
r2597
501}}}}}}{{{#!if s2==true
502##소수점 아래 자리를 기입하는 경우
503{{{#!if this['v'+j] = this['v'+j]+(10.0**(-k))*(+(식.substr(i,1))), s3=true
504}}}{{{#!if k+=1
505##다음 소수점 자리 찾기
r2602
506}}}}}}}}}{{{#!if (s1==true)&&(s2==false)&&(식[i]==46)&&(s3==false)
r2605
507##앞에서 숫자를 발견한 다음 소수점을 발견할 경우 (소수점 발견은 최초 1회에 한함)
r2597
508{{{#!if s2=true, s3=true, k=1+0
509##switch2 : 켜기
r2607
510}}}}}}{{{#!if (s1==true)&&(((s2==false)&&!this['d'+i]&&(식[i]!=46))||((s2==true)&&!this['d'+i]))&&(s3==false)
511##숫자가 더 이상 나오지 않고 소수점을 발견하지 못했을 경우, 소수점을 발견한 상황인데 숫자가 나오지 않을 경우 (소수점이 다시 나오는 경우가 자동적으로 포함)
r2591
512{{{#!if j+=1, s1=false, s2=false, s3=true
r2592
513##소수점 아래 기입하는 스위치도 off, 다음 index(j) 매김.
r2597
514}}}{{{#!if s3==true
515##여기까지 과정을 거쳤다면 스위치 off.
516{{{#!if s3=false
517}}}}}}
518}}}{{{#!if i+=1
r2594
519}}}
r2595
520##
r2599
521{{{#!if false
r2600
522##이 if문은 실행되지 않는 단락. 주석만 제거하고 복사 붙여넣기.
r2599
523{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
524}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
525{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
526}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
527{{{#!if s2==false
528{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
529}}}}}}{{{#!if s2==true
530{{{#!if this['v'+j] = this['v'+j]+(10.0**(-k))*(+(식.substr(i,1))), s3=true
531}}}{{{#!if k+=1
r2603
532}}}}}}}}}{{{#!if (s1==true)&&(s2==false)&&(식[i]==46)&&(s3==false)
r2599
533{{{#!if s2=true, s3=true, k=1+0
r2604
534}}}}}}{{{#!if (s1==true)&&(((s2==false)&&!this['d'+i]&&(식[i]!=46)||(s2==false))||((s2==true)&&!this['d'+i]&&(식=[i]==46)))&&(s3==false)
r2599
535{{{#!if j+=1, s1=false, s2=false, s3=true
536}}}{{{#!if s3==true
537{{{#!if s3=false
538}}}}}}
539}}}{{{#!if i+=1
540}}}
541####
542}}}
543##
r2600
544{{{#!if this['v1'] == 1
545this['v1'] == 1}}}
546##
547{{{#!if s3=false
548}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
549}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
550{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
551}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
552{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
553}}}}}}{{{#!if (s1==true)&&(식[i]==46)&&(s3==false)
554{{{#!if s2=true, s3=true
555}}}}}}{{{#!if (s1==true)&&!this['d'+i]&&(s3==false)
556{{{#!if j+=1, s1=false, s2=false, s3=true
557}}}}}}{{{#!if i+=1
558}}}
559##
r2595
560{{{#!if this['v1'] == 11
561this['v1'] == 11}}}
562##
r2596
563{{{#!if s3=false
564}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
565}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
566{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
567}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
568{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
569}}}}}}{{{#!if (s1==true)&&(식[i]==46)&&(s3==false)
570{{{#!if s2=true, s3=true
571}}}}}}{{{#!if (s1==true)&&!this['d'+i]&&(s3==false)
572{{{#!if j+=1, s1=false, s2=false, s3=true
573}}}}}}{{{#!if i+=1
574}}}{{{#!if s3=false
575}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57)
576}}}{{{#!if (s1==false)&&this['d'+i]&&(s3==false)
577{{{#!if this['v'+j] = +(식.substr(i,1)), s1=true, s3=true
578}}}}}}{{{#!if (s1==true)&&this['d'+i]&&(s3==false)
579{{{#!if this['v'+j] = 10*this['v'+j]+(+(식.substr(i,1))), s3=true
580}}}}}}{{{#!if (s1==true)&&(식[i]==46)&&(s3==false)
581{{{#!if s2=true, s3=true
582}}}}}}{{{#!if (s1==true)&&!this['d'+i]&&(s3==false)
583{{{#!if j+=1, s1=false, s2=false, s3=true
584}}}}}}{{{#!if i+=1
585}}}
r2595
586##
r2596
587{{{#!if this['v2'] == 2
588this['v2'] == 2}}}
r2595
589##
590##
591##
592##
r2593
593{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57), i+=1
r2586
594}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57), i+=1
595}}}{{{#!if this['d'+i] = (식[i]>=48&&식[i]<=57), i+=1
r2584
596}}}
r2586
597## 식 검증이 됐다 치면
r2587
598## dn : true - 수 / false - 연산자
r2586
599{{{#!if this['d0']
6001}}}{{{#!if this['d1']
6011}}}{{{#!if !this['d2']
602+}}}{{{#!if this['d3']
r2585
6032}}}
r2587
604## in : 11+2 에서 '11'은 0번째 위치, '+'는 2번째 위치.. > 0, 2, 3 > 위치 기억 / 뺄셈으로 자릿수 계산
605## 보다 좋은 방법이 있ㅅ을 것 같은데음ㅁ..
606{{{#!if i = 1, j = 1, i0 = 0
607}}}
608{{{#!if t = this['d0'] != this['d1'], t
609{{{#!if this['i'+i] = j, j+=1, i+=1
610}}}}}}{{{#!if !t
611{{{#!if j+=1
612}}}}}}{{{#!if t = this['d1'] != this['d2'], t
613{{{#!if this['i'+i] = j, j+=1, i+=1
614}}}}}}{{{#!if !t
615{{{#!if j+=1
616}}}}}}{{{#!if t = this['d1'] != this['d2'], t
617{{{#!if this['i'+i] = j, j+=1, i+=1
618}}}}}}{{{#!if !t
619{{{#!if j+=1
r2585
620}}}}}}
r2608
621## {{{#!if i0 == 0
622## i0 == 0 }}}{{{#!if i1 == 2
623## i1 == 2 }}}{{{#!if i2 == 3
624## i2 == 3 }}}
r2587
625## {{{#!if list = [d0, d1, d2, d3]
626## }}}
r2624
627}}}