"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/markdown-to-html/docs-marked-renderer.ts" between
material2-7.3.3.tar.gz and material2-7.3.4.tar.gz

About: material2 offers Material Design components for Angular.

docs-marked-renderer.ts  (material2-7.3.3):docs-marked-renderer.ts  (material2-7.3.4)
skipping to change at line 41 skipping to change at line 41
} }
return `<h${level}>${label}</h${level}>`; return `<h${level}>${label}</h${level}>`;
} }
/** Transforms markdown links into the corresponding HTML output. */ /** Transforms markdown links into the corresponding HTML output. */
link(href: string, title: string, text: string) { link(href: string, title: string, text: string) {
// We only want to fix up markdown links that are relative and do not refer to guides already. // We only want to fix up markdown links that are relative and do not refer to guides already.
// Otherwise we always map the link to the "guide/" path. // Otherwise we always map the link to the "guide/" path.
// TODO(devversion): remove this logic and just disallow relative paths. // TODO(devversion): remove this logic and just disallow relative paths.
if (!href.startsWith('http') && !href.includes('guide/')) { if (!href.startsWith('http') && !href.startsWith('#') && !href.includes('gui de/')) {
return super.link(`guide/${basename(href, extname(href))}`, title, text); return super.link(`guide/${basename(href, extname(href))}`, title, text);
} }
return super.link(href, title, text); return super.link(href, title, text);
} }
/** /**
* Method that will be called whenever inline HTML is processed by marked. In that case, * Method that will be called whenever inline HTML is processed by marked. In that case,
* we can easily transform the example comments into real HTML elements. For e xample: * we can easily transform the example comments into real HTML elements. For e xample:
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)