| 690 | |
| 691 | |
| 692 | void Command::PrintExamples() |
| 693 | { |
| 694 | for (int e = 0; e < NumExamples; e++) |
| 695 | { |
| 696 | tString name; |
| 697 | tsPrintf(name, "Example %d - %s", e, Examples[e].Name); |
| 698 | |
| 699 | tString line; |
| 700 | tsPrintf(line, "%s", Examples[e].Line); |
| 701 | |
| 702 | tString desc; |
| 703 | tsPrintf(desc, "%s", Examples[e].Desc); |
| 704 | |
| 705 | desc.Replace("```", ""); |
| 706 | desc.Remove('|'); |
| 707 | desc.Replace('`', '\''); |
| 708 | desc.Replace('^', '`'); |
| 709 | |
| 710 | if (e) |
| 711 | tPrintf("\n"); |
| 712 | tPrintf("\n%s\n\n", name.Chr()); |
| 713 | tPrintf("%s\n", line.Chr()); |
| 714 | tPrintf("%s", desc.Chr()); |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | |
| 719 | void Command::PrintExamplesMarkdown() |