mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Treat URLs in Markdown cells as absolute
Summary: The previous behavior didn't match HyperLink cells. Test Plan: Browser test. Reviewers: jarek Reviewed By: jarek Subscribers: jarek Differential Revision: https://phab.getgrist.com/D4358
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import {constructUrl} from 'app/client/models/gristUrlState';
|
||||
import {gristIconLink} from 'app/client/ui2018/links';
|
||||
import escape from 'lodash/escape';
|
||||
import {marked} from 'marked';
|
||||
|
||||
export const renderer = new marked.Renderer();
|
||||
|
||||
renderer.link = ({href, text}) => gristIconLink(href, text).outerHTML;
|
||||
renderer.link = ({href, text}) => gristIconLink(constructUrl(href), text).outerHTML;
|
||||
|
||||
// Disable Markdown features that we aren't ready to support yet.
|
||||
renderer.hr = ({raw}) => raw;
|
||||
|
||||
Reference in New Issue
Block a user