Support formatting angular syntax in markdown (#18519)
This commit is contained in:
1 parent
f92f80179a
commit
4e401ff7ea
8 files changed
+390
-1
No files matched your search
@@ -0,0 +1,294 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`angular-html.md - {"embeddedLanguageFormatting":"off"} format 1`] = `
|
||||
====================================options=====================================
|
||||
embeddedLanguageFormatting: "off"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-html
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-html
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-html.md format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-html
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-html
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-html-invalid.md - {"embeddedLanguageFormatting":"off"} format 1`] = `
|
||||
====================================options=====================================
|
||||
embeddedLanguageFormatting: "off"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-html
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-html
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-html-invalid.md format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-html
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-html
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-ts.md - {"embeddedLanguageFormatting":"off"} format 1`] = `
|
||||
====================================options=====================================
|
||||
embeddedLanguageFormatting: "off"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-ts
|
||||
type A ={
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-ts
|
||||
type A ={
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-ts.md format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-ts
|
||||
type A ={
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-ts
|
||||
type A = {
|
||||
Ugly: string;
|
||||
};
|
||||
|
||||
@Component({
|
||||
template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (
|
||||
reason of orderForm.couponCode().disabledReasons();
|
||||
track reason
|
||||
) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
\`,
|
||||
})
|
||||
export class Order {}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-ts-invalid.md - {"embeddedLanguageFormatting":"off"} format 1`] = `
|
||||
====================================options=====================================
|
||||
embeddedLanguageFormatting: "off"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-ts
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-ts
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular-ts-invalid.md format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`\`\`angular-ts
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
=====================================output=====================================
|
||||
\`\`\`angular-ts
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: \`
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
\`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1,6 @@
|
||||
```angular-html
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
```angular-html
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,16 @@
|
||||
```angular-ts
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: `
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
```angular-ts
|
||||
type A ={
|
||||
Ugly:string
|
||||
}
|
||||
|
||||
@Component({template: `
|
||||
@if (orderForm.couponCode().disabled()) {
|
||||
<div class="info">
|
||||
@for (reason of orderForm.couponCode().disabledReasons(); track reason) {
|
||||
<p>{{ reason.message }}</p>
|
||||
}</div>
|
||||
}
|
||||
`
|
||||
})
|
||||
export class Order {
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,2 @@
|
||||
runFormatTest(import.meta, ["markdown"]);
|
||||
runFormatTest(import.meta, ["markdown"], { embeddedLanguageFormatting: "off" });
|
||||
Reference in new issue
Block a user