From ca421164fbc792091fbaf0e61c03320571cc05af Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Wed, 20 Feb 2019 13:18:08 -0600 Subject: [PATCH 1/2] add redos test --- test/new/link_tick_redos.html | 31 +++++++++++++++++++++++++++++++ test/new/link_tick_redos.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 test/new/link_tick_redos.html create mode 100644 test/new/link_tick_redos.md diff --git a/test/new/link_tick_redos.html b/test/new/link_tick_redos.html new file mode 100644 index 0000000000..4e4423bf60 --- /dev/null +++ b/test/new/link_tick_redos.html @@ -0,0 +1,31 @@ +

dash_capstyle: ['butt' | 'round' | 'projecting'] +dash_joinstyle: ['miter' | 'round' | 'bevel'] +dashes: sequence of on/off ink in points +drawstyle: ['default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post'] +figure: a ~.Figure instance +fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top' | 'none'] +gid: an id string +label: object +linestyle or ls: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) | '-' | '--' | '-.' | ':' | 'None' | ' ' | ''] +linewidth or lw: float value in points +marker: :mod:A valid marker style <matplotlib.markers> +markeredgecolor or mec: any matplotlib color +markeredgewidth or mew: float value in points +markerfacecolor or mfc: any matplotlib color +markerfacecoloralt or mfcalt: any matplotlib color +markersize or ms: float +markevery: [None | int | length-2 tuple of int | slice | list/array of int | float | length-2 tuple of float] +path_effects: ~.AbstractPathEffect +picker: float distance in points or callable pick function fn(artist, event) +pickradius: float distance in points +rasterized: bool or None +sketch_params: (scale: float, length: float, randomness: float) +snap: bool or None +solid_capstyle: ['butt' | 'round' | 'projecting'] +solid_joinstyle: ['miter' | 'round' | 'bevel'] +transform: a :class:matplotlib.transforms.Transform instance +url: a url string +visible: bool +xdata: 1D array +ydata: 1D array +zorder: float

diff --git a/test/new/link_tick_redos.md b/test/new/link_tick_redos.md new file mode 100644 index 0000000000..38c1107d4d --- /dev/null +++ b/test/new/link_tick_redos.md @@ -0,0 +1,31 @@ + dash_capstyle: ['butt' | 'round' | 'projecting'] + dash_joinstyle: ['miter' | 'round' | 'bevel'] + dashes: sequence of on/off ink in points + drawstyle: ['default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post'] + figure: a `~.Figure` instance + fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top' | 'none'] + gid: an id string + label: object + linestyle or ls: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) | ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'None'`` | ``' '`` | ``''``] + linewidth or lw: float value in points + marker: :mod:`A valid marker style ` + markeredgecolor or mec: any matplotlib color + markeredgewidth or mew: float value in points + markerfacecolor or mfc: any matplotlib color + markerfacecoloralt or mfcalt: any matplotlib color + markersize or ms: float + markevery: [None | int | length-2 tuple of int | slice | list/array of int | float | length-2 tuple of float] + path_effects: `~.AbstractPathEffect` + picker: float distance in points or callable pick function ``fn(artist, event)`` + pickradius: float distance in points + rasterized: bool or None + sketch_params: (scale: float, length: float, randomness: float) + snap: bool or None + solid_capstyle: ['butt' | 'round' | 'projecting'] + solid_joinstyle: ['miter' | 'round' | 'bevel'] + transform: a :class:`matplotlib.transforms.Transform` instance + url: a url string + visible: bool + xdata: 1D array + ydata: 1D array + zorder: float From ce4c874fd34b7b40b0eff8f47291ab0e06bd2bc0 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Wed, 20 Feb 2019 13:20:24 -0600 Subject: [PATCH 2/2] fix link --- lib/marked.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index 8ffcf36f54..f34e2df0bc 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -570,7 +570,7 @@ inline.tag = edit(inline.tag) .replace('attribute', inline._attribute) .getRegex(); -inline._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/; +inline._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/; inline._href = /\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/; inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;