mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-23 17:13:54 +08:00

This is serializing it into bytes via protobuf. The idea is to avoid the expensive parsing of the markdown multiple times, and instead just cache the result.
28 lines
428 B
Protocol Buffer
28 lines
428 B
Protocol Buffer
/*
|
|
* SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
syntax = "proto3";
|
|
|
|
package gitjournal;
|
|
|
|
message NodeList {
|
|
repeated Node node = 1;
|
|
}
|
|
|
|
message Node {
|
|
oneof value {
|
|
Element element = 1;
|
|
string text = 2;
|
|
}
|
|
}
|
|
|
|
message Element {
|
|
string tag = 1;
|
|
map<string, string> attributes = 2;
|
|
repeated Node children = 3;
|
|
string generatedId = 4;
|
|
}
|