I am working on a project on both iOS/Android/macOS/Linux (Windows is optional, and surely no website version). There are a lot of related webpage-like data and the team decided to store the data in a specific markdown format (not the ordinary *.md format) to meet the requirements in the specific domain being dealt with. The custom markdown files are stored in an online database, and are much more compact than other formats e.g. html in order to save storage space and traffic.
Now, in order for the clients to read the contents, we need to parse the markdowns on either server side or client side. The plan is to convert to html and display it in a web-view on client side. This is a dilemma because of the following:
Sending the data in markdown format saves much traffic since the format was designed to be compact.
Parsing speed is not an issue. Each markdown file is pretty short. Caches will stay on client machines so reparsing is not necessary.
Storing both html versions (as cache) and markdown versions sounds like a waste of storage, and discarding the markdown versions is inconvenient if we need to further edit them.
I am aware of several questions on Stack Overflow which unanimously suggest parsing on server side, but they don't really address my needs. First, parsing is not done in browsers, so no additional libraries will be downloaded. Also, they suggest an initial parse on server side and reparse on client side if the content changes. However, in my case the markdowns are static and users are not allowed to make changes. Furthermore, they are concerning the ordinary markdown format (*.md) instead of a custom format.
The only advantage of parsing on server-side that I can think of is to avoid code duplicate. The mobile versions will be written with Flutter (so core parts are written in Dart). The macOS version will involve some Swift and C++, and the Linux version will involve C++ and possibly some Java for GUI (so that it would be easier to port the product to Windows if needed in future). I know I can write everything in C++ directly, but as of today calling C++ from Flutter is still a pain.
Since this is a much more general situation, I think I need some advice here. Any help is appreciated.