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
import { cloneElement, toChildArray } from "preact"; | |
const AutoTargetBlank = ({ children }) => { | |
children = toChildArray(children); | |
return ( | |
<div> | |
{children.map((child) => { | |
return cloneElement(child, { target: '_blank' }); | |
})} | |
</div> |
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
// ESM version of "[email protected]" | |
// https://github.com/pillarjs/path-to-regexp/blob/master/package.json | |
/** | |
* Tokenize input string. | |
*/ | |
function lexer(str) { | |
var tokens = []; | |
var i = 0; | |
while (i < str.length) { |
OlderNewer