Skip to content

Conversation

@tats-u
Copy link
Contributor

@tats-u tats-u commented Jan 21, 2026

Closes #890

Copy link
Collaborator

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll try to take a closer look in a few days.

Do you have any feeling about whether the spec has willingness to adopt something like this out of the box?
Ideally something like this wouldn't even be an option, just the default behavior from the spec.

@tats-u
Copy link
Contributor Author

tats-u commented Jan 21, 2026

Do you have any feeling about whether the spec has willingness to adopt something like this out of the box?
Ideally something like this wouldn't even be an option, just the default behavior from the spec.

I think that "Out of the box" is a little bit too early for a while. It is not strictly compatible with CommonMark. It is a provisional spec and probably going to be revised once more (to peek the character two ahead to deal with some following variation sequences)
It is fine to strongly recommend this.

Comment on lines +191 to +195
static bool IsNonEmojiGeneralUseVariantSelector(Rune r) => r.Value is >= 0xFE00 and <= 0xFE0E;
static bool IsIdeographicVariationSelector(Rune r) => r.Value is >= 0xE0100 and <= 0xE01EF;
static bool IsCjkAmbiousPunctuation(Rune main, Rune vs) => vs.Value is 0xFE01 && main.Value is 0x2018 or 0x2019 or 0x201C or 0x201D;
// As of Unicode 17
static bool IsCjk(Rune r) => r.Value is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a link to where these constants are coming from

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tats-u
Copy link
Contributor Author

tats-u commented Jan 28, 2026

How can we refer to the polyfilled Rune easily?

    <ProjectReference Include="..\Markdig\Markdig.csproj">
      <Aliases>global</Aliases>
    </ProjectReference>

forces us to add extra Markdig:: everywhere.

@MihaZupan
Copy link
Collaborator

I'd ifdef the test to just NET

@tats-u
Copy link
Contributor Author

tats-u commented Jan 28, 2026

I have no where should be #ifdef NET'ed.

@MihaZupan
Copy link
Collaborator

Does something like this not work?

#if NET
[Test]
[TestCase(...)]
public void TestCheckOpenCloseDelimiterCjkFriendly(...)
{
    // ...
}
#endif

@tats-u
Copy link
Contributor Author

tats-u commented Jan 28, 2026

As I suspected, it is not concerned with the target framework of the main project. It only refers to the target of the testing project.

{C8CB7325-9E0B-49DE-B99A-06038A93D0F0}

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.

Support CJK Friendly Emphasis extension

3 participants