Skip to content

Instantly share code, notes, and snippets.

λ pwd
/Users/arlolra/Work/Tor/comm-central/obj-x86_64-apple-darwin14.4.0/chat/libraries/otr
λ make clean
rm -f .md core Templates.DB libotr.dylib auth.o b64.o context.o context_priv.o dh.o instag.o mem.o message.o privkey.o proto.o sm.o tlv.o userstate.o auth.o b64.o context.o context_priv.o dh.o instag.o mem.o message.o privkey.o proto.o sm.o tlv.o userstate.o LOGS TAGS a.out auth.s b64.s context.s context_priv.s dh.s instag.s mem.s message.s privkey.s proto.s sm.s tlv.s userstate.s auth.ii b64.ii context.ii context_priv.ii dh.ii instag.ii mem.ii message.ii privkey.ii proto.ii sm.ii tlv.ii userstate.ii auth.i b64.i context.i context_priv.i dh.i instag.i mem.i message.i privkey.i proto.i sm.i tlv.i userstate.i auth.i_o b64.i_o context.i_o context_priv.i_o dh.i_o instag.i_o mem.i_o message.i_o privkey.i_o proto.i_o sm.i_o tlv.i_o userstate.i_o libotr.dylib so_locations _gen _stubs libotr.dylib libotr.exp
rm -f -r /no-such-file
λ make
make[1]: Nothing to be done for `export'.
mkdir -p
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
'dummy_client.c',
]
USE_LIBS += [
diff --git a/chat/libraries/gcrypt/gcrypt-shim.c b/chat/libraries/gcrypt/gcrypt-shim.c
--- a/chat/libraries/gcrypt/gcrypt-shim.c
+++ b/chat/libraries/gcrypt/gcrypt-shim.c
@@ -17,19 +17,24 @@
/*
* The headers used to reimplement the above.
*/
#include <mozilla/mozalloc.h>
#include <gpg-error.h>
#include <assert.h>
diff --git a/src/context.c b/src/context.c
index 44d8b86..b0669f5 100644
--- a/src/context.c
+++ b/src/context.c
@@ -449,7 +449,7 @@ void otrl_context_forget_fingerprint(Fingerprint *fprint,
otrl_context_forget(context);
}
} else {
- if (context->msgstate != OTRL_MSGSTATE_PLAINTEXT ||
+ if (context->msgstate != OTRL_MSGSTATE_ENCRYPTED ||
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index fcdc022..7861be6 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -1745,10 +1745,6 @@ table_heading_tag
// There's been a newline. Remove the break and continue
// tokenizing nested_block_in_tables.
stops.pop('th');
- } else if (input.substr(endOffset() + 1, 2) === '!!') {
- // Ok, no newlines and we broke for a double exclamation.
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index fcdc022..d0df4ad 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -1745,7 +1745,7 @@ table_heading_tag
// There's been a newline. Remove the break and continue
// tokenizing nested_block_in_tables.
stops.pop('th');
- } else if (input.substr(endOffset() + 1, 2) === '!!') {
+ } else if (input.substr(endOffset(), 2) === '!!') {
var r = require("request")
var url = "http://wiki.vocaloid.de/api.php?format=json&action=query&meta=siteinfo&siprop=namespaces%7Cnamespacealiases%7Cmagicwords%7Cfunctionhooks%7Cextensiontags%7Cgeneral%7Cinterwikimap%7Clanguages%7Cprotocols&rawcontinue=1";
r({ url: url, json: false }, function(err, res, body) {
var json = JSON.parse(body);
// console.log(typeof body)
})
#!/usr/bin/env bash
REPO=$(pwd)
JSHINT=$REPO/node_modules/.bin/jshint
JSCS=$REPO/node_modules/.bin/jscs
npm run dump-tokenizer && ${JSHINT} ${REPO} && ${JSCS} ${REPO}
EXIT_CODE=$?
diff --git a/lib/mediawiki.DOMUtils.js b/lib/mediawiki.DOMUtils.js
index e4ab596..8579169 100644
--- a/lib/mediawiki.DOMUtils.js
+++ b/lib/mediawiki.DOMUtils.js
@@ -694,11 +694,22 @@ DOMUtils = DU = {
return this.isList(n) || this.isListItem(n);
},
+ isNestedInListItem: function( n ) {
+ var parentNode = n.parentNode;
@arlolra
arlolra / -
Created February 6, 2015 08:18
diff --git a/lib/ext.core.AttributeExpander.js b/lib/ext.core.AttributeExpander.js
index 2bd3a5d..a0a3ac9 100644
--- a/lib/ext.core.AttributeExpander.js
+++ b/lib/ext.core.AttributeExpander.js
@@ -304,7 +304,12 @@ AttributeExpander.prototype._returnAttributes = function( token, cb, expandedAtt
if (expandedA.v === '') {
var kArray = Util.tokensToString(expandedK, true),
kStr = (kArray.constructor === String) ? kArray : kArray[0],
- kvs = /=/.test(kStr) ? this.tokenizer.tokenize(kStr, 'generic_attributes') : null;
+ kvs = null;