Skip to content
Snippets Groups Projects
Commit de41fd9e authored by Lars Trieloff's avatar Lars Trieloff
Browse files

#14 test single regex examples

parent dbe65d33
No related branches found
No related tags found
No related merge requests found
...@@ -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.$
``` ```
......
...@@ -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 %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment