git ssb

30+

cel / git-ssb-web



Commit 4aef9079af3e876b9236a27d1cab03026dca7739

Fix line breaks

Make overwritten text regex consistent with `breaks: true` option
cel committed on 1/20/2021, 1:15:35 AM
Parent: 2e0f4754d77ef48d1fe5df444a5025a8f477a250

Files changed

lib/markdown.jschanged
lib/markdown.jsView
@@ -64,9 +64,9 @@
6464 // hack to make git link mentions work
6565 var mdRules = new marked.InlineLexer(1, marked.defaults).rules
6666 mdRules.mention =
6767 /^(\s)?([@%&][A-Za-z0-9\._\-+=\/]*[A-Za-z0-9_\-+=\/]|[0-9a-f]{40})/
68-mdRules.text = /^[\s\S]+?(?=[\\<!\[_*`:~]|https?:\/\/| {2,}\n| [@%&]|[0-9a-f]{40}|$)/
68 +mdRules.text = /^[\s\S]+?(?=[\\<!\[_*`:~]|https?:\/\/| *\n| [@%&]|[0-9a-f]{40}|$)/
6969
7070 module.exports = function (text, options, cb) {
7171 if (!text) return ''
7272 if (typeof text != 'string') text = String(text)

Built with git-ssb-web