Skip to content

hanfix 1.0.0 - #434

Open
s5bug wants to merge 3 commits into
moonlight-mod:mainfrom
s5bug:hanfix-1.0.0
Open

s5bug wants to merge 3 commits into
moonlight-mod:mainfrom
s5bug:hanfix-1.0.0

Conversation

@s5bug

@s5bug s5bug commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Before (Discord set to ja-JP: zh-CN, zh-TW, and ko-KR render incorrectly):

{48A5689E-CF07-48CA-8002-A539D79C4FB1}

Before (Discord set to zh-CN: ja-JP, zh-TW, and ko-KR render incorrectly):

{984C298F-29EE-458B-AAF3-344E0E49DA2D}

Before (Discord set to ko-KR: ja-JP, zh-CN, and zh-TW render incorrectly):

{BB4C5D19-4143-4B00-BEBD-BEAF5412DC76}

After:

{22CDBC12-428F-4DF8-B596-6F31D4B41A94}

This code needs to be triple-checked that it's not doing something horrible / obviously-wrong. A lot of the stuff that got this to the finish line feels really hacky / I shouldn't be doing it, so I'd like another set of eyes.

@Cynosphere

Copy link
Copy Markdown
Member

node.ts seems redundant and would just introduce context bridge microlatency since you're just relying on the bundler to read the provided files anyways.

The stylesheet is a little bit horror, but its fine even if it will break themes a tiny bit.

@s5bug

s5bug commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

The stylesheet is a little bit horror

Yeah unfortunately I can't figure out any way to propagate the value in :root:lang(...). inherit as the default font-family for span inherits var(--primary-font) from something that gets the variable from :root, so just redefining it doesn't work/shadow it :(

@s5bug

s5bug commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

node.ts seems redundant

I'd like for a way to make the processing that node.ts does happen at build-time. Is there a way to do that that doesn't completely suck?

@Cynosphere

Copy link
Copy Markdown
Member

In its current state it is happening at build time, I'm just saying that it can be moved into the webpack module itself without any concern.

@s5bug

s5bug commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Is it? I see the raw .txt and .json in the node.js after pnpm run build, rather than the result of the post-processing I do to them.

@s5bug

s5bug commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Ok, no more node.ts, and the browser side gets a nice and performant JSON.parse( on a string literal :D

@s5bug

s5bug commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

I can't figure out how to get it to not break links. [魚になりたい](<https://aly.fish>) should just work and yet it does not.

@Cynosphere

Copy link
Copy Markdown
Member

Priority related probably, I just don't remember if there is any mechanisms to adjust that cleanly in the current state of markdown. Back before moonlight the solution was to just hack into the text rule's regex and that wasn't fun

@s5bug

s5bug commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

I can't imagine it's priority related: if it was, I would expect either

  • italic/bold/underline to not work [**here**](https://example.com), or
  • for [魚になりたい](<https://aly.fish>) to look like [魚になりたい](https://aly.fish)

To me it looks like something is crashing somewhere, because I'm not even getting a proper CJK wrapper on the CJK text. I just get <span>[魚になりたい](&lt;https://aly.fish&gt;)</span>.

@s5bug

s5bug commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Tbh I think the best thing to do is get rid of this being a custom rule entirely and replace the rendering of the text rule, but I don't know of a safe way to do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants