This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const renderer = new marked.Renderer() | |
let originParagraph = renderer.paragraph.bind(renderer) | |
renderer.paragraph = (text) => { | |
const blockRegex = /\$\$[^\$]*\$\$/g | |
const inlineRegex = /\$[^\$]*\$/g | |
let blockExprArray = text.match(blockRegex) | |
let inlineExprArray = text.match(inlineRegex) | |
for (let i in blockExprArray) { | |
const expr = blockExprArray[i] | |
const result = renderMathsExpression(expr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <X11/Xlib.h> | |
#include <iostream> | |
#include <unistd.h> | |
int main(void) { | |
Display* dpy = XOpenDisplay(0); | |
int scr = XDefaultScreen(dpy); | |
Window root_window = XRootWindow(dpy, scr); | |
int height = DisplayHeight(dpy, scr); |