Skip to content

Instantly share code, notes, and snippets.

@jdittrich
Created January 9, 2018 22:23
Show Gist options
  • Save jdittrich/3f589ab7d2cd360bb31ae97f990d9371 to your computer and use it in GitHub Desktop.
Save jdittrich/3f589ab7d2cd360bb31ae97f990d9371 to your computer and use it in GitHub Desktop.
marks for improving english text
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.0/mark.js";
$("head").append(s);
var markinstance = new Mark(document.querySelectorAll("p,ul,li,quote, cite"));//all common elements pandoc puts out.
markinstance.markRegExp(/(\.|;|—|\:)/gim, {className:"strongHighlight"}); //sentence lenght
markinstance.markRegExp(/(was |will |do |is |of )/gim); //simple passive verbs
markinstance.markRegExp(/( is that)/gim); //no "is that"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment