Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

hoon: fix mixed-case aura tokenisation#3002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
RunDevelopment merged 2 commits intoPrismJS:masterfrommatildepark:master
Jul 19, 2021
Merged

hoon: fix mixed-case aura tokenisation#3002

RunDevelopment merged 2 commits intoPrismJS:masterfrommatildepark:master
Jul 19, 2021

Conversation

matildepark
Copy link
Contributor

In Hoon, we have "auras", which arecategories of atoms, which are themselves just positive integers. These look like@da but are sometimes, mixed-case, lowercase then uppercase, like@tD in the Caesar cipher example. These were incorrectly parsed, and are fixed in this PR. Compare the test diffs for an example.

@github-actions
Copy link

github-actionsbot commentedJul 19, 2021
edited
Loading

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +1 B (+0.3%).

filemasterpullsize diff% diff
components/prism-hoon.min.js330 B331 B+1 B+0.3%

Generated by 🚫dangerJS against9744050

@@ -8,6 +8,7 @@ Prism.languages.hoon = {
'class-name': [
{
pattern: /@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/,
greedy: true

Choose a reason for hiding this comment

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

greedy: true is one way to fix it. However,greedy: true is more expensive performance-wise and there is an even simpler fix: Just swap the order offunction andclass-name.

Swapping them should have the same result without the performance hit.

@matildepark
Copy link
ContributorAuthor

Fair enough! Patched.

@RunDevelopmentRunDevelopment merged commit9c8911b intoPrismJS:masterJul 19, 2021
@RunDevelopment
Copy link
Member

Thank you very much@matildepark!

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

@RunDevelopmentRunDevelopmentRunDevelopment approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@matildepark@RunDevelopment

[8]ページ先頭

©2009-2025 Movatter.jp