diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-08-29 16:25:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-29 16:25:28 +0200 |
| commit | aa615754999a9453f50edfbfd18188352ecbdd79 (patch) | |
| tree | 30fe20ce7ca7d88a25ed03028446e730655cc86f /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 63cfbf5d9f402357c0eaf8923363a4ea26942ec0 (diff) | |
| parent | 4478ecc352d6f3f12c1cb4b9dd5e7e06762286ee (diff) | |
| download | rust-aa615754999a9453f50edfbfd18188352ecbdd79.tar.gz rust-aa615754999a9453f50edfbfd18188352ecbdd79.zip | |
Rollup merge of #88173 - camelid:refactor-markdown-length-limit, r=GuillaumeGomez
Refactor Markdown length-limited summary implementation This PR is a new approach to #79749. This PR refactors the implementation of `markdown_summary_with_limit()`, separating the logic of determining when the limit has been reached from the actual rendering process. The main advantage of the new approach is that it guarantees that all HTML tags are closed, whereas the previous implementation could generate tags that were never closed. It also ensures that no empty tags are generated (e.g., `<em></em>`). The new implementation consists of a general-purpose struct `HtmlWithLimit` that manages the length-limiting logic and a function `markdown_summary_with_limit()` that renders Markdown to HTML using the struct. r? `@GuillaumeGomez`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
