<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustdoc/html/length_limit.rs, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-11-28T02:05:43+00:00</updated>
<entry>
<title>Fix new clippy lints</title>
<updated>2024-11-28T02:05:43+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-11-27T14:44:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f0c301ffe47470caf3f809ee8fc0119e4cb49317'/>
<id>urn:sha1:f0c301ffe47470caf3f809ee8fc0119e4cb49317</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve code readability by moving fmt args directly into the string</title>
<updated>2023-08-16T14:35:23+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2023-08-14T20:25:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a1a94b1c0f0b990fa5dc0ecf05ba3acaa17a1d9a'/>
<id>urn:sha1:a1a94b1c0f0b990fa5dc0ecf05ba3acaa17a1d9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove from librustdoc and clippy too</title>
<updated>2023-01-28T04:44:19+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2023-01-28T04:02:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c4fa0d3ea6e8a8d1e8f2965b5a84d9775f31610b'/>
<id>urn:sha1:c4fa0d3ea6e8a8d1e8f2965b5a84d9775f31610b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't panic if `close_tag()` is called without tags to close</title>
<updated>2021-08-26T03:09:17+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-08-26T03:09:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4478ecc352d6f3f12c1cb4b9dd5e7e06762286ee'/>
<id>urn:sha1:4478ecc352d6f3f12c1cb4b9dd5e7e06762286ee</id>
<content type='text'>
This can happen when a tag is opened after the length limit is reached;
the tag will not end up being added to `unclosed_tags` because the queue
will never be flushed. So, now, if the `unclosed_tags` stack is empty,
`close_tag()` does nothing.

This change fixes a panic in the `limit_0` unit test.
</content>
</entry>
<entry>
<title>Assert that `tag_name` is alphabetic</title>
<updated>2021-08-26T03:03:27+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-08-25T20:49:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d932e62dd9a6137a831d0917aa80aefd7ff47018'/>
<id>urn:sha1:d932e62dd9a6137a831d0917aa80aefd7ff47018</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add tests for `HtmlWithLimit`</title>
<updated>2021-08-26T03:03:25+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-08-22T01:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f8ca5764c36feab162893cd16b567d87edd4cf8e'/>
<id>urn:sha1:f8ca5764c36feab162893cd16b567d87edd4cf8e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use `write!`</title>
<updated>2021-08-22T00:24:49+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-08-22T00:24:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d18936a731fa1d2bf49073bd0f059129ef1b0ef1'/>
<id>urn:sha1:d18936a731fa1d2bf49073bd0f059129ef1b0ef1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use the length limit as the initial capacity</title>
<updated>2021-08-21T23:58:29+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-08-21T23:58:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74147b86c50ebdaa7d8420fcbf82fa647a6db394'/>
<id>urn:sha1:74147b86c50ebdaa7d8420fcbf82fa647a6db394</id>
<content type='text'>
The length limit turns out to be a surprisingly good heuristic for
initial allocation size. See here for more details [1].

[1]: https://github.com/rust-lang/rust/pull/88173#discussion_r692531631
</content>
</entry>
<entry>
<title>Clarify wording in docs</title>
<updated>2021-08-21T19:39:17+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-08-21T19:39:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=09f0876dc63bb386bc07d182b1bf85afb61f7db6'/>
<id>urn:sha1:09f0876dc63bb386bc07d182b1bf85afb61f7db6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor Markdown length-limited summary implementation</title>
<updated>2021-08-19T23:22:54+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-07-22T23:46:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=39ef8ea767f6dd953e63f8a0a4828dac37bed50c'/>
<id>urn:sha1:39ef8ea767f6dd953e63f8a0a4828dac37bed50c</id>
<content type='text'>
This commit 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., `&lt;em&gt;&lt;/em&gt;`).

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.
</content>
</entry>
</feed>
