Skip to main content
18 events
when toggle format what by license comment
Jun 1, 2021 at 12:10 comment added Sebastian Simon Anothrer example: Some lines of code block are bold when the question has at least two language tags.
S Feb 19, 2021 at 21:43 history bounty ended rene
S Feb 19, 2021 at 21:43 history notice removed rene
Feb 19, 2021 at 21:38 history edited DesStaffMod
edited tags
Feb 19, 2021 at 21:37 answer added DesStaffMod timeline score: 0
Feb 15, 2021 at 15:40 history edited CertainPerformance CC BY-SA 4.0
added 248 characters in body
S Feb 15, 2021 at 15:11 history bounty started rene
S Feb 15, 2021 at 15:11 history notice added rene Draw attention
Oct 29, 2020 at 19:48 comment added Josh Goebel @CertainPerformance If you have any thoughts I'd love to hear them. github.com/highlightjs/highlight.js/issues/2768 This is what I was thinking of for an auto-detect/classification plugin API. There is no way to do exactly what you're doing here (saving a few CPU cycles), but you could accomplish the exact same result with analysis in a after callback... Logic: Did any of the auto-hinted languages score > 3? If so, return just those results, else: return the all results. Your idea would shrink to several lines of very simple JS.
Oct 29, 2020 at 19:32 comment added Josh Goebel result relevance is unexpectedly low; perhaps question is mistagged Ah I just looked at what you are doing more closely... that's interesting. I was imagining that the tags auto-hints (xml, java, html in your first example) would simply be used as a boost or force multiplier (rather than exclusively). So we'd analyze everything as usual but then the html, java, and xml scores would get say a 50% boost (to boost them above any noise). Though I suppose you could still use either strategy after-the-fact, just with a small amount of extra CPU burn.
Oct 29, 2020 at 12:15 comment added Josh Goebel I'm happy to add this smarter support to my Chrome extension if someone wants to figure out the FULL tag -> hint table for me (ie, the list of which tags auto-hint to which languages)... it's probably not that hard (a script snippet could probably do it with fetch in the browser console, etc?). github.com/joshgoebel/se_highlightjs/issues/3
Oct 20, 2020 at 13:49 history edited Yaakov Ellis
edited tags
Oct 17, 2020 at 19:46 answer added Josh Goebel timeline score: 15
Sep 30, 2020 at 17:05 comment added CertainPerformance Aside from language detection, I think a lot of the issues we're having with highlight.js are simply manifestations of users being resistant to change, as most of us are. I'm hopeful it'll grow on us.
Sep 30, 2020 at 17:04 comment added CertainPerformance Highlighters require a significant amount of code. Allowing both would somewhat increase overall bundle size (which is an issue for those with bad connections). It'd also add another layer of programming (adding toggling options, and adding / removing the different highlighters' formatting dynamically) and would introduce potential confusion to the already-complicated process of how to ask and answer good questions. IMO, using a single well-maintained library instead makes things much simpler.
Sep 30, 2020 at 16:55 comment added 10 Rep This may be a nooby question, but why can't we choose which highlighter we want for the question? Sometimes highlight.js is better, and sometimes Prettify is better. Why can't we just choose which one instead of having SO choose it for us?
Sep 30, 2020 at 16:46 history edited CertainPerformance CC BY-SA 4.0
added 102 characters in body
Sep 30, 2020 at 15:20 history asked CertainPerformance CC BY-SA 4.0