···2323 }
2424}
25252626-// do search and print result if any
2727-//
2626+/// do search and print result if any
2727+///
2828fn do_search(search: String) {
2929 [
3030 "https://wiki.warframe.com/w/Condition_Overload_%28Mechanic%29?action=edit§ion=7",
···5959 Nil
6060}
61616262-// format row into human readable string
6363-//
6262+/// format row into human readable string
6363+///
6464fn format_row(row: Row) -> String {
6565 let rating = case row {
6666 Row(math_behavior: "Multiplying", ..) -> "very good"
···111111 <> " interaction with GunCO."
112112}
113113114114-// do request and return Row if successful
115115-//
114114+/// do request and return Row if successful
115115+///
116116fn get_gun_page_data(
117117 url: String,
118118) -> promise.Promise(Result(List(Row), fetch.FetchError)) {
···131131 promise.resolve(Ok(rows))
132132}
133133134134-// discards the html and returns only the raw text from the textarea
135135-//
134134+/// discards the html and returns only the raw text from the textarea
135135+///
136136fn get_text_area(html_text: String) -> Result(String, Nil) {
137137 html_text
138138 // trim to start of textarea
···166166 )
167167}
168168169169-// Parse data line by line from the following formats:
170170-//
171171-// !Weapon!!Attack Name!!Projectile Type!!Attack Unmodded Damage!!Actual CO Damage Bonus at +100%!!CO Damage Bonus Relative To Base Damage!!Math/Behavior Type!!Notes
172172-//
173173-// single name - one line
174174-//
175175-// |{{Weapon|Ambassador}}||Alt-fire Hitscan AoE||AoE||800||600||75%||Adding||Radial hit only receives CO bonus on target directly hit by laser. CO-bonus scales off hitscan damage. AoE does not scale off multishot.
176176-// |-
177177-//
178178-// multi name - one line
179179-//
180180-// |{{Weapon|Braton}}/{{Weapon|MK1-Braton|MK1}}/{{Weapon|Braton Prime|Prime}}/{{Weapon|Braton Vandal|Vandal}}||Incarnon Form AoE||AoE||74||70||95%||Adding||Listed values for Braton Prime with inactive Daring Reverie. Radial hit only receives CO bonus on target directly hit by bullet. AoE does not scale off multishot.
181181-// |-
182182-//
183183-// multi line - single & multi name
184184-//
185185-// |{{Weapon|Evensong}}
186186-// |Charged Radial Attack
187187-// |AoE
188188-// |150
189189-// |0
190190-// |0%
191191-// |N/A
192192-// |Does not apply
193193-// |-
194194-//
195195-// as well as both mixed, into row type
196196-//
197197-//
169169+/// Parse data line by line from the following formats:
170170+///
171171+/// !Weapon!!Attack Name!!Projectile Type!!Attack Unmodded Damage!!Actual CO Damage Bonus at +100%!!CO Damage Bonus Relative To Base Damage!!Math/Behavior Type!!Notes
172172+///
173173+/// single name - one line
174174+///
175175+/// |{{Weapon|Ambassador}}||Alt-fire Hitscan AoE||AoE||800||600||75%||Adding||Radial hit only receives CO bonus on target directly hit by laser. CO-bonus scales off hitscan damage. AoE does not scale off multishot.
176176+/// |-
177177+///
178178+/// multi name - one line
179179+///
180180+/// |{{Weapon|Braton}}/{{Weapon|MK1-Braton|MK1}}/{{Weapon|Braton Prime|Prime}}/{{Weapon|Braton Vandal|Vandal}}||Incarnon Form AoE||AoE||74||70||95%||Adding||Listed values for Braton Prime with inactive Daring Reverie. Radial hit only receives CO bonus on target directly hit by bullet. AoE does not scale off multishot.
181181+/// |-
182182+///
183183+/// multi line - single & multi name
184184+///
185185+/// |{{Weapon|Evensong}}
186186+/// |Charged Radial Attack
187187+/// |AoE
188188+/// |150
189189+/// |0
190190+/// |0%
191191+/// |N/A
192192+/// |Does not apply
193193+/// |-
194194+///
195195+/// as well as both mixed, into row type
196196+///
197197+///
198198fn process_lines(lines: List(String), acc: List(Row)) -> List(Row) {
199199 case lines {
200200 ["|{{Weapon|" <> name_line, ..rest] -> {
···207207 }
208208}
209209210210-// parses 1 'Row' type worth of data from the supplied lines
211211-// handles single line, multi line and mixed data
212212-//
210210+/// parses 1 'Row' type worth of data from the supplied lines
211211+/// handles single line, multi line and mixed data
212212+///
213213fn parse_row(name_line: String, lines: List(String)) -> #(Row, List(String)) {
214214 let #(names, line_rest) = parse_names(name_line, [])
215215···236236 )
237237}
238238239239-// parses the next value from the data
240240-//
239239+/// parses the next value from the data
240240+///
241241fn parse_next_value(
242242 line_rest: String,
243243 lines: List(String),
···267267 }
268268}
269269270270-// parse the weapon names
271271-//
270270+/// parse the weapon names
271271+///
272272fn parse_names(line: String, acc) {
273273 let sep = splitter.new(["}}/{{Weapon|", "}}"])
274274