This file contains hidden or 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 { Pluggable, PluginHost, usePluggableState } from '@netflix-internal/rgt-components/lib/lattice'; | |
import { getDefaultRoutes } from '../routes'; | |
import { Content, Header, Router } from './components'; | |
import { useFetchPluginConfiguration } from './hooks'; | |
export const App = ({ appName }: { appName: string }) => { | |
// Fetch plugin host configuration remotely for this application | |
const config = useFetchPluginConfiguration(appName); | |
// Allow for routes to be extended by plugins |
This file contains hidden or 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
// Code block (4 spaces padded) | |
'use strict'; | |
module.exports = function code(state, startLine, endLine/*, silent*/) { | |
var nextLine, last, token; | |
if (state.sCount[startLine] - state.blkIndent < 4) { return false; } |
This file contains hidden or 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
qwefqwefqwefe |
This file contains hidden or 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
var codepen = function (markdownit) { | |
markdownit.renderer.rules.codepen = function tokenize_return(tokens, idx) { | |
return '<div class="' + tokens[idx].codepenId + ' code_pan_temp"></div>'; | |
}; | |
markdownit.inline.ruler.before('emphasis', 'codepen', function (state, silent) { | |
var CODEPAN_LINK_REGEX = /^\[[^\]]+\]\(((?:http|https):\/\/codepen.io\/(\w+)\/pen\/(\w+))\)/, | |
CODEPAN_INLINE_REGEX = /^((?:http|https):\/\/codepen.io\/(\w+)\/pen\/(\w+))/; | |
var linkParser = CODEPAN_LINK_REGEX.exec(state.src) || CODEPAN_INLINE_REGEX.exec(state.src); | |
if (!linkParser) { |