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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable storing "Include" tags test cases #1324

Merged
merged 19 commits into from
Aug 13, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div id="fragment">content fragment</div>
8 changes: 8 additions & 0 deletions packages/cli/test/functional/test_site/expected/siteData.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@
"dates": "Dates"
},
"headingKeywords": {}
},
{
"src": "testVariableContainsInclude.md",
"title": "Variable should be able to store included content fragments",
"headings": {
"content-fragment": "content fragment"
},
"headingKeywords": {}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>

<head>
<meta name="default-head-top">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="MarkBind 2.15.2">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Variable should be able to store included content fragments</title>
<link rel="stylesheet" href="markbind/css/bootstrap.min.css">
<link rel="stylesheet" href="markbind/css/bootstrap-vue.min.css">
<link rel="stylesheet" href="markbind/fontawesome/css/all.min.css">
<link rel="stylesheet" href="markbind/glyphicons/css/bootstrap-glyphicons.min.css">
<link rel="stylesheet" href="markbind/css/octicons.css">
<link rel="stylesheet" href="markbind/css/github.min.css">
<link rel="stylesheet" href="markbind/css/markbind.css">
<script src="markbind/js/polyfill.min.js"></script>
<script src="markbind/js/vue.min.js"></script>
<script src="markbind/js/components.min.js"></script>
<script src="markbind/js/jquery.min.js"></script>
<link rel="stylesheet" href="/test_site/plugins/testMarkbindPlugin/testMarkbindPluginStylesheet.css">
<link rel="stylesheet" href="/test_site/plugins/markbind-plugin-anchors/markbind-plugin-anchors.css">
<link rel="stylesheet" href="markbind/layouts/default/styles.css">
<meta name="default-head-bottom">
<link rel="icon" href="/test_site/favicon.png">
</head>

<body>
<div id="app">
<div id="flex-body">
<div id="content-wrapper">
<div></div>
<h1 id="content-fragment"><span>content fragment</span><a class="fa fa-anchor" href="#content-fragment" onclick="event.stopPropagation()"></a></h1>
</div>


</div>
<footer>
<div class="text-center">
Default footer
</div>
</footer>
</div>
</body>
<script src="markbind/js/bootstrap-utility.min.js"></script>
<script>
const baseUrl = '/test_site'
const enableSearch = true
</script>
<script src="markbind/js/setup.js"></script>
<script src="/test_site/plugins/testMarkbindPlugin/testMarkbindPluginScript.js"></script>
<script>
alert("Inline plugin script loaded!")
</script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TRACKING-ID"></script>
<script>
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'TRACKING-ID');
</script>
<script src="markbind/layouts/default/scripts.js"></script>

</html>
6 changes: 5 additions & 1 deletion packages/cli/test/functional/test_site/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"src": "testAnchorGeneration.md",
"title": "Anchor Generation Test"
},
{
{
"src": "testTooltipSpacing.mbd",
"title": "Tooltip Spacing Test"
},
Expand Down Expand Up @@ -91,6 +91,10 @@
{
"src": "testDates.md",
"title": "Nunjucks date filter tests"
},
{
"src": "testVariableContainsInclude.md",
"title": "Variable should be able to store included content fragments"
}
],
"ignore": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<variable name="test"># <include src="contentFragmentToInclude.md#fragment" inline /></variable>

{{ test }}