Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #3184: Inject xlink in mermaidAPI. #3185

Merged
merged 3 commits into from Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
test:
runs-on: ubuntu-latest
name: check tests
if: github.repository_owner == 'mermaid'
if: github.repository_owner == 'mermaid-js'
steps:
- uses: actions/checkout@v2
with:
Expand Down
1 change: 0 additions & 1 deletion src/diagrams/class/classRenderer-v2.js
Expand Up @@ -338,7 +338,6 @@ export const draw = function (text, id) {
? select(sandboxElement.nodes()[0].contentDocument.body)
: select('body');
const svg = root.select(`[id="${id}"]`);
svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');

// Run the renderer. This is what draws the final graph.
const element = root.select('#' + id + ' g');
Expand Down
1 change: 0 additions & 1 deletion src/diagrams/class/classRenderer.js
Expand Up @@ -181,7 +181,6 @@ export const draw = function (text, id) {

// Fetch the default direction, use TD if none was found
const diagram = root.select(`[id='${id}']`);
diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');
insertMarkers(diagram);

// Layout graph, Create a new directed graph
Expand Down
1 change: 0 additions & 1 deletion src/diagrams/flowchart/flowRenderer-v2.js
Expand Up @@ -443,7 +443,6 @@ export const draw = function (text, id) {

// Set up an SVG group so that we can translate the final graph.
const svg = root.select(`[id="${id}"]`);
svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');

// Adds title and description to the flow chart
addSVGAccessibilityFields(parser.yy, svg, id);
Expand Down
1 change: 0 additions & 1 deletion src/diagrams/flowchart/flowRenderer.js
Expand Up @@ -425,7 +425,6 @@ export const draw = function (text, id) {

// Set up an SVG group so that we can translate the final graph.
const svg = root.select(`[id="${id}"]`);
svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');

// Adds title and description to the flow chart
addSVGAccessibilityFields(parser.yy, svg, id);
Expand Down
1 change: 0 additions & 1 deletion src/diagrams/user-journey/journeyRenderer.js
Expand Up @@ -69,7 +69,6 @@ export const draw = function (text, id) {

bounds.init();
const diagram = root.select('#' + id);
diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');

svgDraw.initGraphics(diagram);

Expand Down
1 change: 1 addition & 0 deletions src/mermaidAPI.js
Expand Up @@ -313,6 +313,7 @@ const render = function (id, _txt, cb, container) {
.attr('id', id)
.attr('width', '100%')
.attr('xmlns', 'http://www.w3.org/2000/svg')
.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink')
.append('g');
} else {
// No container was provided
Expand Down