MCPcopy Index your code
hub / github.com/gto76/python-cheatsheet / fixHighlights

Function fixHighlights

parse.js:839–863  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

837}
838
839function fixHighlights() {
840 $(`code:contains(<int> = ±0b<bin>)`).html(BIN_HEX);
841 $(`code:contains(@lru_cache(maxsize=None))`).html(LRU_CACHE);
842 $(`code:contains(@debug(print_result=True))`).html(PARAMETRIZED_DECORATOR);
843 $(`code:contains(print/str/repr([<obj>]))`).html(REPR_USE_CASES);
844 $(`code:contains((self, a=None):)`).html(CONSTRUCTOR_OVERLOADING);
845 $(`code:contains(make_dataclass(\'<class_name>\')`).html(DATACLASS);
846 $(`code:contains(shutil.copy)`).html(SHUTIL_COPY);
847 $(`code:contains(os.rename)`).html(OS_RENAME);
848 $(`code:contains(\'<n>s\')`).html(STRUCT_FORMAT);
849 $(`code:contains(match <object/expression>:)`).html(MATCH);
850 $(`code:contains(>>> match Path)`).html(MATCH_EXAMPLE);
851 $(`code:contains(import asyncio, collections, curses, curses.textpad, enum, random)`).html(COROUTINES);
852 $(`code:contains(import curses, os)`).html(CURSES);
853 $(`code:contains(pip3 install tqdm)`).html(PROGRESS_BAR);
854 $(`code:contains(>>> log.basicConfig()`).html(LOGGING_EXAMPLE);
855 $(`code:contains(a_float = max()`).html(AUDIO_1);
856 $(`code:contains(samples_f = (sin(i *)`).html(AUDIO_2);
857 $(`code:contains(collections, dataclasses, enum, io, itertools)`).html(MARIO);
858 $(`code:contains(>>> gb = df.groupby)`).html(GROUPBY);
859 $(`code:contains(cdef <ctype> <var_name> = <obj>)`).html(CYTHON_1);
860 $(`code:contains(cdef class <class_name>:)`).html(CYTHON_2);
861 $(`code:contains(cdef enum <enum_name>: <member_name>, <member_name>, ...)`).html(CYTHON_3);
862 $(`ul:contains(Only available in)`).html(INDEX);
863}
864
865function preventPageBreaks() {
866 $(':header').each(function(index) {

Callers 1

highlightCodeFunction · 0.85

Calls 1

$Function · 0.85

Tested by

no test coverage detected