Fix documentation escaping.
GitOrigin-RevId: 691cad7eb078eac7642bd58655a8408d1229b9b1
This commit is contained in:
parent
95c2bb1730
commit
eeceb2c1aa
@ -6,7 +6,7 @@ class DotnetTlDocumentationGenerator extends TlDocumentationGenerator
|
||||
{
|
||||
protected function escapeDocumentation($doc)
|
||||
{
|
||||
$doc = preg_replace_callback('/(?<!["A-Za-z_])[A-Za-z]*_[A-Za-z_]*/',
|
||||
$doc = preg_replace_callback('/(?<!["A-Za-z_\/])[A-Za-z]*_[A-Za-z_]*/',
|
||||
function ($word_matches)
|
||||
{
|
||||
return ucfirst(preg_replace_callback('/_([A-Za-z])/', function ($matches) {return strtoupper($matches[1]);}, $word_matches[0]));
|
||||
|
@ -10,7 +10,7 @@ class JavadocTlDocumentationGenerator extends TlDocumentationGenerator
|
||||
|
||||
protected function escapeDocumentation($doc)
|
||||
{
|
||||
$doc = preg_replace_callback('/(?<!["A-Za-z_])[A-Za-z]*_[A-Za-z_]*/',
|
||||
$doc = preg_replace_callback('/(?<!["A-Za-z_\/])[A-Za-z]*_[A-Za-z_]*/',
|
||||
function ($word_matches)
|
||||
{
|
||||
return preg_replace_callback('/_([A-Za-z])/', function ($matches) {return strtoupper($matches[1]);}, $word_matches[0]);
|
||||
|
@ -146,7 +146,7 @@ abstract class TlDocumentationGenerator
|
||||
if ($key === 'description') {
|
||||
$need_class_description = false;
|
||||
|
||||
$value = $this->addDot($value);
|
||||
$value = $this->escapeDocumentation($this->addDot($value));
|
||||
|
||||
$this->addAbstractClassDocumentation($current_class, $value);
|
||||
continue;
|
||||
|
@ -355,7 +355,7 @@ Result<size_t> FileDownloader::process_part(Part part, NetQueryPtr net_query) {
|
||||
|
||||
auto slice = bytes.as_slice().truncate(part.size);
|
||||
TRY_STATUS(acquire_fd());
|
||||
LOG(INFO) << "Got " << slice.size() << " bytes at " << part.offset << " for \"" << path_ << '"';
|
||||
LOG(INFO) << "Got " << slice.size() << " bytes at offset " << part.offset << " for \"" << path_ << '"';
|
||||
TRY_RESULT(written, fd_.pwrite(slice, part.offset));
|
||||
// may write less than part.size, when size of downloadable file is unknown
|
||||
if (written != slice.size()) {
|
||||
|
Loading…
Reference in New Issue
Block a user