Skip to content

Instantly share code, notes, and snippets.

@laughinghan
laughinghan / scanner.js
Last active August 29, 2015 14:05
scan that shit
var patterns = [];
(function (args) {
for (var i = 0; i < args.length; i++) {
if (!args[i]) continue;
var parts = args[i].source.split('::=');
var name = parts[0].trim();
var pattern = RegExp('^(?:' + parts[1].trim() + ')');
patterns.push([name, pattern]);
}
@laughinghan
laughinghan / InterVer.md
Last active January 6, 2024 07:22
Interface Versioning - Never break backcompat, keep the API nimble

Interface Versioning (InterVer)

Never break backcompat, keep the API nimble

An extension of SemVer with a stricter (yet more realistic) backcompat guarantee, that provides more flexibility to change the API, for libraries that are packaged and downloaded (not services accessed remotely over the Internet (see Note 4)).

\hcf
\gcf
\lcm
\mod
\proj
\span
\arcsinh
\asinh
\asin
\arccosh
@laughinghan
laughinghan / test.md
Last active September 12, 2015 07:10
` leading`
`trailing `

leading
trailing

`  leading`
`trailing `
diff --git a/src/commands/math.js b/src/commands/math.js
index 197507c..50a768b 100644
--- a/src/commands/math.js
+++ b/src/commands/math.js
@@ -431,11 +431,10 @@ var MathBlock = P(MathElement, function(_, super_) {
API.StaticMath = function(APIClasses) {
return P(APIClasses.AbstractMathQuill, function(_, super_) {
this.RootBlock = MathBlock;
+ this.rootClassNames = 'mq-math-mode';
_.__mathquillify = function() {
diff --git a/test/visual.html b/test/visual.html
index 1a47eca..e0f86af 100644
--- a/test/visual.html
+++ b/test/visual.html
@@ -97,7 +97,7 @@ td {
// paste some stuff that needs resizing
textarea.trigger('paste');
textarea.val('\\pi\\sqrt{\\sqrt{\\frac12}}\\int');
- setTimeout(function() { if (count !== 1) throw 'reflow not called'; });
+ //setTimeout(function() { if (count !== 1) throw 'reflow not called'; });
\
\$
\'
\MathQuillMathField
\Pr
\arg
\class
\exp
\hom
\injlim
\acos
\acosec
\acosech
\acosh
\acot
\acotan
\acotanh
\acoth
\acsc
\acsch
\acos
\acosec
\acosech
\acosh
\acot
\acotan
\acotanh
\acoth
\acsc
\acsch
@laughinghan
laughinghan / MathSON.md
Last active December 7, 2023 21:52
MathSON - JSON for Math Formulae

MathSON

Status: Draft 1 In Progress. This document is undergoing its first revision. Initial implementation has begun alongside editing Draft 1. Your feedback is hoped and dreamed of.

Mathematical Structured Object Notation is a JSON-based representation for most of the common subset of what LaTeX and Presentation MathML can