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