| ... | ... | @@ -2639,14 +2639,23 @@ var zigAnalysis; |
| 2639 | 2639 | }); |
| 2640 | 2640 | } |
| 2641 | 2641 | |
| 2642 | | |
| 2642 | |
| 2643 | 2643 | function shortDescMarkdown(docs) { |
| 2644 | | let parts = docs.trim().split("\n"); |
| 2645 | | let firstLine = parts[0]; |
| 2646 | | return markdown(firstLine); |
| 2644 | const trimmed_docs = docs.trim(); |
| 2645 | let index = trimmed_docs.indexOf('.'); |
| 2646 | if (index < 0) { |
| 2647 | index = trimmed_docs.indexOf('\n'); |
| 2648 | if (index < 0) { |
| 2649 | index = trimmed_docs.length; |
| 2650 | } |
| 2651 | } else { |
| 2652 | index += 1; // include the period |
| 2653 | } |
| 2654 | const slice = trimmed_docs.slice(0, index); |
| 2655 | return markdown(slice); |
| 2647 | 2656 | } |
| 2648 | 2657 | |
| 2649 | | |
| 2658 | |
| 2650 | 2659 | function markdown(input) { |
| 2651 | 2660 | const raw_lines = input.split('\n'); // zig allows no '\r', so we don't need to split on CR |
| 2652 | 2661 | |