You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This software currently renders markdown content to HTML upon receiving a message through the API, and stores it in contentHTML. The PostContent component directly uses contentHTML, which restricts flexibility for developers wanting to adjust rendering settings later. Additionally, preserving both markdown and HTML seems inefficient, though this approach does reduce display load.
I believe storing only markdown in the database and rendering HTML upon display offers greater benefits. While I'm not fully acquainted with the software's specifications, I understand that there might be scenarios where only contentHTML is persisted, and content is not. In such cases, continuity by using existing contentHTML might be necessary. But, delaying rendering maximaizes expandability.
In order to clarify my problem awareness, I will show below what I actually tried to do and what happened. I aimed to extend src/text.ts by integrating markdown-it-highlightjs. The task was straightforward, and I quickly achieved my goal. However, I realized syntax highlighting does not apply to pre-existing posts.
If you agree with my standpoint, I intend to proceed with drafting a pull request. I would appreciate your thoughts.
The text was updated successfully, but these errors were encountered:
That's a fair point. One thing that I'm concerned about is that during Markdown rendering, we're performing database lookups and HTTP requests to expand the mention syntax (to verify that the mentioned actor actually exists). I'm not sure how performing database lookups and HTTP requests on every render will affect performance. Maybe we need to separate dealing with the mention syntax into a separate step from Markdown rendering. 🤔
Or, as a quick and dirty solution, maybe we could add a button to the administration dashboard that rerenders the Markdown of all past posts. 😅
This software currently renders markdown content to HTML upon receiving a message through the API, and stores it in
contentHTML
. ThePostContent
component directly usescontentHTML
, which restricts flexibility for developers wanting to adjust rendering settings later. Additionally, preserving both markdown and HTML seems inefficient, though this approach does reduce display load.I believe storing only markdown in the database and rendering HTML upon display offers greater benefits. While I'm not fully acquainted with the software's specifications, I understand that there might be scenarios where only
contentHTML
is persisted, andcontent
is not. In such cases, continuity by using existingcontentHTML
might be necessary. But, delaying rendering maximaizes expandability.In order to clarify my problem awareness, I will show below what I actually tried to do and what happened. I aimed to extend
src/text.ts
by integratingmarkdown-it-highlightjs
. The task was straightforward, and I quickly achieved my goal. However, I realized syntax highlighting does not apply to pre-existing posts.If you agree with my standpoint, I intend to proceed with drafting a pull request. I would appreciate your thoughts.
The text was updated successfully, but these errors were encountered: