Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsonschema2md
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fork
jsonschema2md
Commits
de41fd9e
Commit
de41fd9e
authored
7 years ago
by
Lars Trieloff
Browse files
Options
Downloads
Patches
Plain Diff
#14 test single regex examples
parent
dbe65d33
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/docs/simpletypes.schema.md
+1
-2
1 addition, 2 deletions
examples/docs/simpletypes.schema.md
templates/md/string-type.ejs
+3
-3
3 additions, 3 deletions
templates/md/string-type.ejs
with
4 additions
and
5 deletions
examples/docs/simpletypes.schema.md
+
1
−
2
View file @
de41fd9e
...
@@ -162,8 +162,6 @@ A string following a regular expression
...
@@ -162,8 +162,6 @@ A string following a regular expression
All instances must conform to this regular expression
All instances must conform to this regular expression
(test examples
[
here
](
https://regexr.com/?expression=%5Eba.%24
)
):
(test examples
[
here
](
https://regexr.com/?expression=%5Eba.%24
)
):
} else if ((typeof schema['meta:example'])==="string") {
(test example:
[](
https://regexr.com/?expression=%5Eba.%24
)
):
```
regex
```
regex
^ba.$
^ba.$
```
```
...
@@ -194,6 +192,7 @@ A string following a regular expression
...
@@ -194,6 +192,7 @@ A string following a regular expression
All instances must conform to this regular expression
All instances must conform to this regular expression
(test example:
[
bar
](
https://regexr.com/?expression=%5Eba.%24&text=bar
)
):
```
regex
```
regex
^ba.$
^ba.$
```
```
...
...
This diff is collapsed.
Click to expand it.
templates/md/string-type.ejs
+
3
−
3
View file @
de41fd9e
...
@@ -28,10 +28,10 @@ else if (schema.format==="hostname") { %>* format: `hostname` Domai
...
@@ -28,10 +28,10 @@ else if (schema.format==="hostname") { %>* format: `hostname` Domai
<% if(schema.maxLength) { %>* maximum length: <%=schema.maxLength %> characters<% } %>
<% if(schema.maxLength) { %>* maximum length: <%=schema.maxLength %> characters<% } %>
<% if(schema.pattern) { %>
<% if(schema.pattern) { %>
All instances must conform to this regular expression
All instances must conform to this regular expression
<% if
(schema['meta:example']===undefined) { %>
<% if(schema['meta:example']===undefined) { %>
(test examples [here](https://regexr.com/?expression=<%- encodeURIComponent(schema.pattern) %>)):
(test examples [here](https://regexr.com/?expression=<%- encodeURIComponent(schema.pattern) %>)):
} else if
((typeof schema['meta:example'])==="string") { %>
<%
} else if((typeof schema['meta:example'])==="string") { %>
(test example: [<%= schema['meta:example']%>](https://regexr.com/?expression=<%- encodeURIComponent(schema.pattern) %>)):
(test example: [<%= schema['meta:example']%>](https://regexr.com/?expression=<%- encodeURIComponent(schema.pattern)
%>&text=<%- encodeURIComponent(schema['meta:example'])
%>)):
<% } %>
<% } %>
```regex
```regex
<%- schema.pattern %>
<%- schema.pattern %>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment