private void History(string line, bool new_version) { bool break_line = false; if (section != KTKSections.History) { line = line.Substring(HistoryTag.Length).Trim(); section = KTKSections.History; } else { break_line = new_version; } if (line.Length <= 0) { return; } if (break_line) { historyText += "<br />"; } historyText += line; if (new_version) { historyText += "<br />"; } }
private void Description(string line) { if (section != KTKSections.Description) { line = line.Substring(DescriptionTag.Length).Trim(); section = KTKSections.Description; } if (line.Length > 0) { descriptionText += line + ' '; } }
private void Ref(string line) { if (section != KTKSections.Ref) { line = line.Substring(RefTag.Length).Trim(); section = KTKSections.Ref; } else { line = StripDocComment(line); } int start, i; start = 0; i = 0; bool seek_start = false; string link; while (i < line.Length) { if (!char.IsLetterOrDigit(line[i]) && line[i] != '.' && line[i] != '_') { if (!seek_start) { seek_start = true; link = line.Substring(start, i - start).Trim(); AppendToCurrentReference(link); AddPotentialReference(); } } else { if (seek_start) { seek_start = false; start = i; } } i++; } if (!seek_start) { link = line.Substring(start, i - start).Trim(); AppendToCurrentReference(link); AddPotentialReference(); } }
private void Note(string line) { if (section != KTKSections.Note) { line = line.Substring(NoteTag.Length).Trim(); section = KTKSections.Note; } if (line.Length <= 0) { return; } noteText += line + ' '; }
private void Returns(string line) { if (section != KTKSections.Returns) { line = line.Substring(ReturnsTag.Length).Trim(); section = KTKSections.Returns; } if (line.Length <= 0) { return; } returnsText += line; }
private void Example(string striped, string line) { if (section != KTKSections.Example) { line = striped.Substring(ExampleTag.Length).Trim(); section = KTKSections.Example; } else { line = StripDocComment(line); } if (line.Length <= 0) { return; } exampleText += line + '\n'; }
private void Arguments(string line) { if (section != KTKSections.Arguments) { line = line.Substring(ArgumentsTag.Length).Trim(); section = KTKSections.Arguments; } int pos = line.IndexOf("--"); if (pos > 0) { AddPotentialArgument(); line = line.Substring(pos + 2).Trim(); } if (line.Length <= 0) { return; } AppendToCurrentArgument(line + ' '); }