Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Editorial) Example 1 does not render properly #67

Closed
iherman opened this issue Oct 10, 2017 · 14 comments · Fixed by #69
Closed

(Editorial) Example 1 does not render properly #67

iherman opened this issue Oct 10, 2017 · 14 comments · Fixed by #69

Comments

@iherman
Copy link
Member

iherman commented Oct 10, 2017

The original source says

var x = Math.random() * r * 2 - r;
var y = Math.random() * r * 2 - r;

However, the '*' character does not display on some (all?) browsers; an empty space is displayed. See, for example,

image

I see the same in FF, Vivaldi, FF Dev edition, Chrome...

@igrigorik
Copy link
Member

Thanks for flagging this. Paging @marcoscaceres.. This looks like a respec issue, I think.

@marcoscaceres
Copy link
Member

Whoa.. yeah. That's messed up. The highlighter seems to be stripping the "*". Will poke at it a bit more. You might want to add CSS class "nohighlight" for now.

@marcoscaceres
Copy link
Member

Filed: w3c/respec#1389

Will poke at it look soon.

@marcoscaceres
Copy link
Member

It's actually a bug with the markdown parser :( I might need to replace the markdown parser. Looking for options.

@marcoscaceres
Copy link
Member

@igrigorik, unfortunately, it's going to be another 2 weeks or so before I get to this. Could you maybe change the example to (the problem happens when "*" appears twice on the same line):

var rand = Math.random() * r;
var x =  rand * 2 - r;
rand = Math.random() * r;
var y =  rand * 2 - r;

rmcilroy added a commit to rmcilroy/requestidlecallback that referenced this issue Oct 20, 2017
Work around a respec markdown bug by escaping * in example.

Addresses w3c#67
@igrigorik
Copy link
Member

Closing, resolved via rmcilroy@c216c4b. Thanks Ross!

@rmcilroy
Copy link
Contributor

I don't actually think rmcilroy/requestidlecallback@c216c4b fixes this (at least didn't seem to when I checked, that's why I hadn't made a pull request). Does it fix the issue when you checked?

@rmcilroy rmcilroy reopened this Oct 27, 2017
@igrigorik
Copy link
Member

cmd-shift-R... Doh.

@rmcilroy any objections to Marcos' suggestion on changing the example?

@rmcilroy
Copy link
Contributor

Nope if that fixes it SGTM, thanks

@igrigorik
Copy link
Member

Actually, it didn't.. Doh, again. @marcoscaceres back to the drawing board? :)

@marcoscaceres
Copy link
Member

Could kindly try what I suggested here:
#67 (comment)

I hit a couple of snags replacing the markdown parse - other parsers are over 100kb minified (compared to ~40kb) for Marked.js... so I’m a bit hesitant to replace it as it would bloat ReSpec to over 500kb. I’ll investigate if there is a fix for this as a PR in marked.js’ repo.

Alternatively, I’m also considering moving markdown parsing off main thread. It’s a bit more work, but might give the right balance between speed, download size, and not having this bug.

@igrigorik
Copy link
Member

@marcoscaceres I did, same issue.

image

@marcoscaceres
Copy link
Member

Apologies, I misread. I’ll try a few things out and get back to you soon!

@marcoscaceres
Copy link
Member

Sent a PR for this: #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants