在节点中进行某些更改时,如何在OuterHTML中禁用自动更正

时间:2018-08-15 16:34:18

标签: c# html-agility-pack

我是HTML Agility Pack的新手。

我只尝试更改包含i18n属性的节点内的某些属性,并改为用translation属性。

当我尝试获取文档的externalHTML时,属性已按预期进行了更改,但是html敏捷包已自动更正了一些更改。

有没有办法禁用自动校正?

这是我的代码段:

HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.Load(file);            

HtmlNodeCollection i18nNodes = doc.DocumentNode.SelectNodes("//*[@i18n]");

if (i18nNodes != null)
{
    foreach (HtmlNode node in i18nNodes)
    {
        node.Attributes.Add("translation", node.Attributes["i18n"].Value);
        node.Attributes.Remove("i18n");     
    }
}

// Do export the changed html to new html file
// doc.DocumentNode.OuterHtml

以下是更改前后的内容:

之前:

<ng-container *ngIf="!settingsLoaded">
    <section class="container" id="main-loading">
        <div class="logo">
            <img src="assets/img/LogoKatapult-01.png" alt="Katapul Logo">
        </div>
        <div>
            <div class="mx-1 my-2">
                <mat-progress-bar mode="determinate" [value]="settingsProgress"></mat-progress-bar>
            </div>
            <div class="my-2 alert alert-danger" *ngIf="settingsError">
                {{settingsError}}
            </div>
            <div class="text-center">
                Loading...
            </div>
        </div>
    </section>
</ng-container>
<ng-container *ngIf="settingsLoaded">
    <app-header [(navigationState)]="navigationState" *ngIf="(authService.isAuthenticated() | async) === true && isNavigationVisible()"></app-header>
    <mat-sidenav-container>
        <mat-sidenav  mode="side" [opened]="(authService.isAuthenticated() | async) === true && isNavigationVisible()">
            <nav class="side-navigation" role="navigation" [class.visible]="navigationState">
                <ul class="nav flex-column">
                    <li class="nav-item">
                        <a class="nav-link" routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
                            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
                                <g class="svg_img nav-icon" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M6.364 11.25c-1.003 0-1.819-.787-1.819-1.75s.816-1.75 1.819-1.75c1.003 0 1.818.787 1.818 1.75s-.815 1.75-1.818 1.75zM20 8.625H9.87C9.466 7.12 8.055 6 6.365 6c-1.69 0-3.1 1.12-3.507 2.625H0v1.75h2.857C3.264 11.88 4.675 13 6.364 13c1.69 0 3.1-1.12 3.507-2.625H20v-1.75zM15.455 5.25c-1.003 0-1.819-.787-1.819-1.75 0-.962.816-1.75 1.819-1.75 1.003 0 1.818.788 1.818 1.75 0 .963-.815 1.75-1.818 1.75zM20 2.625h-1.038C18.555 1.12 17.145 0 15.455 0c-1.69 0-3.1 1.12-3.507 2.625H0v1.75h11.948C12.355 5.88 13.765 7 15.455 7c1.69 0 3.1-1.12 3.507-2.625H20v-1.75zM15.455 18.25c-1.003 0-1.819-.788-1.819-1.75 0-.963.816-1.75 1.819-1.75 1.003 0 1.818.787 1.818 1.75 0 .962-.815 1.75-1.818 1.75zm0-5.25c-1.69 0-3.1 1.12-3.507 2.625H0v1.75h11.948C12.355 18.88 13.765 20 15.455 20c1.69 0 3.1-1.12 3.507-2.625H20v-1.75h-1.038C18.555 14.12 17.145 13 15.455 13z"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" *ngxPermissionsOnly="'ROLE_SUPER_ADMIN'" hidden>
                        <a class="nav-link" routerLink="/e-coaching" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="m11.881 1.1186c3.797 0 6.875 3.078 6.875 6.875 0 3.797-3.078 6.875-6.875 6.875-3.797 0-6.875-3.078-6.875-6.875 0-3.797 3.078-6.875 6.875-6.875zm7.8754 14.344-3.0642-0.76605c-3.2193 2.3156-7.1216 1.7988-9.6224 0l-3.0642 0.76605c-1.8363 0.45908-3.1246 2.109-3.1246 4.0018v1.5918c0 1.1391 0.9234 2.0625 2.0625 2.0625h17.875c1.1391 0 2.0625-0.9234 2.0625-2.0625v-1.5918c0-1.8929-1.2882-3.5428-3.1246-4.0018z" stroke-width=".042969"/>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerLink="/chat" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="M20.167 14.53c0 .5-.413.907-.917.907H8.36L5.5 17.955v-2.518H2.75a.914.914 0 0 1-.917-.908V2.724c0-.501.413-.908.917-.908h16.5c.504 0 .917.407.917.908V14.53zM19.25 0H2.75C1.237 0 0 1.221 0 2.724V14.53c0 1.502 1.237 2.724 2.75 2.724h.917V22l5.39-4.747H19.25c1.522 0 2.75-1.222 2.75-2.724V2.724C22 1.221 20.772 0 19.25 0z"/>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerLink="/calendar" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="21" height="23" viewBox="0 0 21 23">
                                <g class="svg_img" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M1.91 21h17.18V8.59H1.91V21zM3.817 3.818v1.91h1.91v-1.91h9.545v1.91h1.909v-1.91h1.909v2.864H1.909V3.818h1.91zM21 1.91h-3.818V0h-1.91v1.91H5.728V0H3.818v1.91H0v21h21v-21z"/>
                                    <path d="M11.53 13.354l-.925-2.854-.926 2.854H6.682l2.424 1.766-.926 2.845 2.425-1.757 2.425 1.757-.926-2.845 2.424-1.766h-2.997"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" hidden>
                        <a class="nav-link" routerLink="/events" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="21" height="23" viewBox="0 0 21 23">
                                <g class="svg_img" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M1.91 21h17.18V8.59H1.91V21zM3.817 3.818v1.91h1.91v-1.91h9.545v1.91h1.909v-1.91h1.909v2.864H1.909V3.818h1.91zM21 1.91h-3.818V0h-1.91v1.91H5.728V0H3.818v1.91H0v21h21v-21z"/>
                                    <path d="M11.53 13.354l-.925-2.854-.926 2.854H6.682l2.424 1.766-.926 2.845 2.425-1.757 2.425 1.757-.926-2.845 2.424-1.766h-2.997"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerLink="/library" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="19" viewBox="0 0 22 19">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="M20 2.111v11.611h-2v-9.5H5v-2.11h15zM2 16.89h14V6.333H2V16.89zM3 4.222H0V19h18v-3.167h4V0H3v4.222z"/>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" *ngxPermissionsOnly="'view_smartplans'">
                        <a class="nav-link" routerLink="/smartplan" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 19 19">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M0 5h5V0H0zM7 5h5V0H7zM14 5h5V0h-5zM0 12h5V7H0zM7 12h5V7H7zM14 12h5V7h-5zM0 19h5v-5H0zM7 19h5v-5H7zM14 19h5v-5h-5z"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerLink="/tests" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M7.838 16.163v-1.458l1.461 1.458H7.838zm11.57-10.107l-8.813 8.806-1.461-1.456L17.947 4.6l1.461 1.457zm2.592 0L17.947 2 6 13.944V18h4.053L22 6.056z"/>
                                    <path d="M16 15.583h-1.882v4.584H1.882V1.833h12.236v1.834H16V0H0v22h16v-6.417"/>
                                    <path d="M3 5h7V4H3zM3 8h5V7H3zM3 12h3v-1H3z"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" hidden>
                        <a class="nav-link" routerLink="/alliance" routerLinkActive="active">
                            <i class="nav-icon material-icons">people</i>
                            <span class="nav-text" i18n="@@menu.alliance">
                                Alliance
                            </span>
                        </a>
                    </li>
                    <li class="nav-item" hidden>
                        <a class="nav-link" routerLink="/financial" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" viewBox="0 0 22 20">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M1.913 10.585h1.014l.226-.628A4.722 4.722 0 0 1 4.81 7.76h1.885V4.174c1.633.419 1.903 1.27 1.912 2.085v.56h5.74c2.637 0 4.782 2.112 4.782 4.707 0 1.672-.916 3.233-2.392 4.074l-.477.272v2.245h-1.913v-1.883H9.565v1.883H7.652v-1.824l-.797-.133a4.816 4.816 0 0 1-3.406-2.386l-.142-.26-1.394-.686v-2.243zm3.826 7.25V20h5.74v-1.883h.956V20h5.739v-3.07c1.783-1.226 2.87-3.249 2.87-5.404 0-1.103-.28-2.144-.771-3.06A2.825 2.825 0 0 0 22 5.876h-1.913a.95.95 0 0 1-.957.942v.104a6.725 6.725 0 0 0-4.782-1.987H10.31c-.427-1.287-1.614-2.504-4.465-2.818L4.783 2v3.595a6.661 6.661 0 0 0-3.171 3.107H0v5.29l1.925.947a6.75 6.75 0 0 0 3.814 2.896z"/>
                                    <path d="M12 2a2 2 0 1 0 4 0 2 2 0 0 0-4 0"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" hidden>
                        <a class="nav-link" routerLink="/subscription" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M4 9c1.1 0 2-.895 2-2 0-1.104-.9-2-2-2s-2 .896-2 2c0 1.105.9 2 2 2M.91 22h1.817v-5.538h.91V22h1.818V11.846H10V10H1.818C.818 10 0 10.828 0 11.846v4.616h.91V22M19.273 10.083c.5 0 .909.412.909.917 0 .506-.41.917-.91.917s-.908-.411-.908-.917c0-.505.409-.917.909-.917zm0 8.25c.5 0 .909.412.909.917 0 .506-.41.917-.91.917s-.908-.411-.908-.917c0-.505.409-.917.909-.917zm0-16.5c.5 0 .909.412.909.917 0 .506-.41.917-.91.917s-.908-.411-.908-.917c0-.505.409-.917.909-.917zm-2.555 1.834c.373 1.065 1.373 1.833 2.555 1.833C20.773 5.5 22 4.267 22 2.75 22 1.234 20.773 0 19.273 0c-1.182 0-2.182.77-2.555 1.833h-2.9v8.25H12v1.834h1.818v8.25h2.9C17.091 21.232 18.091 22 19.273 22c1.5 0 2.727-1.233 2.727-2.75 0-1.516-1.227-2.75-2.727-2.75-1.182 0-2.182.77-2.555 1.833h-1.082v-6.416h1.082c.373 1.065 1.373 1.833 2.555 1.833 1.5 0 2.727-1.233 2.727-2.75 0-1.516-1.227-2.75-2.727-2.75-1.182 0-2.182.77-2.555 1.833h-1.082V3.667h1.082z"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerLink="/teams" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="20" viewBox="0 0 24 20">
                                <g class="svg_img" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M15 18h7v-1h-7v1zM2 18h7v-1H2v1zm12-3v1h-4v-1H0v3c0 1.103.9 2 2 2h20c1.1 0 2-.897 2-2v-3H14zM3 2h18v12h2V2c0-1.103-.9-2-2-2H3C1.9 0 1 .897 1 2v12h2V2"/>
                                    <path d="M5 12v2h8v-2c0-1.104-.9-2-2-2H7c-1.1 0-2 .896-2 2M11 7c0-1.104-.9-2-2-2s-2 .896-2 2c0 1.105.9 2 2 2s2-.895 2-2M15 7v3l1.5-1.499L18 7l-3-3v3"/>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" *ngxPermissionsOnly="'view_admin'">
                        <a class="nav-link" routerLink="/admin" routerLinkActive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="m20.731 13.671 1.9746 1.1398c0.22551 0.13015 0.33018 0.3993 0.25294 0.64798-0.51291 1.6514-1.3886 3.1434-2.5339 4.3825a0.55675 0.55675 0 0 1 -0.68722 0.10443l-1.9731-1.1396a8.8765 8.8765 0 0 1 -2.8152 1.6277v2.2788a0.55647 0.55647 0 0 1 -0.43447 0.54294c-1.6196 0.36372-3.3592 0.38253-5.0605 3.3e-4 -0.25437-0.0571-0.43568-0.28246-0.43568-0.54317v-2.2789a8.8755 8.8755 0 0 1 -2.8152 -1.6277l-1.9731 1.1396a0.55675 0.55675 0 0 1 -0.68722 -0.10443c-1.1453-1.2392-2.021-2.7311-2.5339-4.3825-0.0772-0.24863 0.0274-0.51778 0.25293-0.64798l1.9746-1.1398a8.9646 8.9646 0 0 1 0 -3.2526l-1.9746-1.1398c-0.22551-0.13015-0.33018-0.39931-0.25294-0.64798 0.51292-1.6514 1.3886-3.1434 2.534-4.3825a0.55675 0.55675 0 0 1 0.68722 -0.10444l1.9731 1.1396a8.8765 8.8765 0 0 1 2.8152 -1.6277v-2.2788a0.55647 0.55647 0 0 1 0.43447 -0.54294c1.6196-0.36372 3.3592-0.38253 5.0605-3.2e-4 0.25437 0.0571 0.43568 0.28245 0.43568 0.54317v2.2789a8.8755 8.8755 0 0 1 2.8152 1.6277l1.9731-1.1396a0.55675 0.55675 0 0 1 0.68722 0.10443c1.1453 1.2392 2.021 2.7311 2.534 4.3825 0.0772 0.24863-0.0274 0.51778-0.25294 0.64798l-1.9746 1.1398a8.9649 8.9649 0 0 1 0 3.2526zm-5.0406-1.6263c0-2.0439-1.6628-3.7067-3.7067-3.7067-2.0439 0-3.7067 1.6628-3.7067 3.7067 0 2.0439 1.6628 3.7067 3.7067 3.7067 2.0439 0 3.7067-1.6628 3.7067-3.7067z" stroke-width=".046334"/>
                            </svg>
                        </a>
                    </li>
                </ul>
            </nav>
        </mat-sidenav>
        <mat-sidenav-content id="content-wrapper" [ngClass]="{'anonymous': !(authService.isAuthenticated() | async) || !isNavigationVisible()}">
            <router-outlet></router-outlet>
        </mat-sidenav-content>
    </mat-sidenav-container>
</ng-container>

之后:

<ng-container *ngif="!settingsLoaded">
    <section class="container" id="main-loading">
        <div class="logo">
            <img src="assets/img/LogoKatapult-01.png" alt="Katapul Logo">
        </div>
        <div>
            <div class="mx-1 my-2">
                <mat-progress-bar mode="determinate" [value]="settingsProgress"></mat-progress-bar>
            </div>
            <div class="my-2 alert alert-danger" *ngif="settingsError">
                {{settingsError}}
            </div>
            <div class="text-center">
                Loading...
            </div>
        </div>
    </section>
</ng-container>
<ng-container *ngif="settingsLoaded">
    <app-header [(navigationstate)]="navigationState" *ngif="(authService.isAuthenticated() | async) === true && isNavigationVisible()"></app-header>
    <mat-sidenav-container>
        <mat-sidenav mode="side" [opened]="(authService.isAuthenticated() | async) === true && isNavigationVisible()">
            <nav class="side-navigation" role="navigation" [class.visible]="navigationState">
                <ul class="nav flex-column">
                    <li class="nav-item">
                        <a class="nav-link" routerlink="/" routerlinkactive="active" [routerlinkactiveoptions]="{exact: true}">
                            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewbox="0 0 20 20">
                                <g class="svg_img nav-icon" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M6.364 11.25c-1.003 0-1.819-.787-1.819-1.75s.816-1.75 1.819-1.75c1.003 0 1.818.787 1.818 1.75s-.815 1.75-1.818 1.75zM20 8.625H9.87C9.466 7.12 8.055 6 6.365 6c-1.69 0-3.1 1.12-3.507 2.625H0v1.75h2.857C3.264 11.88 4.675 13 6.364 13c1.69 0 3.1-1.12 3.507-2.625H20v-1.75zM15.455 5.25c-1.003 0-1.819-.787-1.819-1.75 0-.962.816-1.75 1.819-1.75 1.003 0 1.818.788 1.818 1.75 0 .963-.815 1.75-1.818 1.75zM20 2.625h-1.038C18.555 1.12 17.145 0 15.455 0c-1.69 0-3.1 1.12-3.507 2.625H0v1.75h11.948C12.355 5.88 13.765 7 15.455 7c1.69 0 3.1-1.12 3.507-2.625H20v-1.75zM15.455 18.25c-1.003 0-1.819-.788-1.819-1.75 0-.963.816-1.75 1.819-1.75 1.003 0 1.818.787 1.818 1.75 0 .962-.815 1.75-1.818 1.75zm0-5.25c-1.69 0-3.1 1.12-3.507 2.625H0v1.75h11.948C12.355 18.88 13.765 20 15.455 20c1.69 0 3.1-1.12 3.507-2.625H20v-1.75h-1.038C18.555 14.12 17.145 13 15.455 13z"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" *ngxpermissionsonly="'ROLE_SUPER_ADMIN'" hidden="">
                        <a class="nav-link" routerlink="/e-coaching" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="m11.881 1.1186c3.797 0 6.875 3.078 6.875 6.875 0 3.797-3.078 6.875-6.875 6.875-3.797 0-6.875-3.078-6.875-6.875 0-3.797 3.078-6.875 6.875-6.875zm7.8754 14.344-3.0642-0.76605c-3.2193 2.3156-7.1216 1.7988-9.6224 0l-3.0642 0.76605c-1.8363 0.45908-3.1246 2.109-3.1246 4.0018v1.5918c0 1.1391 0.9234 2.0625 2.0625 2.0625h17.875c1.1391 0 2.0625-0.9234 2.0625-2.0625v-1.5918c0-1.8929-1.2882-3.5428-3.1246-4.0018z" stroke-width=".042969"></path>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerlink="/chat" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewbox="0 0 22 22">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="M20.167 14.53c0 .5-.413.907-.917.907H8.36L5.5 17.955v-2.518H2.75a.914.914 0 0 1-.917-.908V2.724c0-.501.413-.908.917-.908h16.5c.504 0 .917.407.917.908V14.53zM19.25 0H2.75C1.237 0 0 1.221 0 2.724V14.53c0 1.502 1.237 2.724 2.75 2.724h.917V22l5.39-4.747H19.25c1.522 0 2.75-1.222 2.75-2.724V2.724C22 1.221 20.772 0 19.25 0z"></path>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerlink="/calendar" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="21" height="23" viewbox="0 0 21 23">
                                <g class="svg_img" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M1.91 21h17.18V8.59H1.91V21zM3.817 3.818v1.91h1.91v-1.91h9.545v1.91h1.909v-1.91h1.909v2.864H1.909V3.818h1.91zM21 1.91h-3.818V0h-1.91v1.91H5.728V0H3.818v1.91H0v21h21v-21z"></path>
                                    <path d="M11.53 13.354l-.925-2.854-.926 2.854H6.682l2.424 1.766-.926 2.845 2.425-1.757 2.425 1.757-.926-2.845 2.424-1.766h-2.997"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" hidden="">
                        <a class="nav-link" routerlink="/events" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="21" height="23" viewbox="0 0 21 23">
                                <g class="svg_img" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M1.91 21h17.18V8.59H1.91V21zM3.817 3.818v1.91h1.91v-1.91h9.545v1.91h1.909v-1.91h1.909v2.864H1.909V3.818h1.91zM21 1.91h-3.818V0h-1.91v1.91H5.728V0H3.818v1.91H0v21h21v-21z"></path>
                                    <path d="M11.53 13.354l-.925-2.854-.926 2.854H6.682l2.424 1.766-.926 2.845 2.425-1.757 2.425 1.757-.926-2.845 2.424-1.766h-2.997"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerlink="/library" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="19" viewbox="0 0 22 19">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="M20 2.111v11.611h-2v-9.5H5v-2.11h15zM2 16.89h14V6.333H2V16.89zM3 4.222H0V19h18v-3.167h4V0H3v4.222z"></path>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" *ngxpermissionsonly="'view_smartplans'">
                        <a class="nav-link" routerlink="/smartplan" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewbox="0 0 19 19">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M0 5h5V0H0zM7 5h5V0H7zM14 5h5V0h-5zM0 12h5V7H0zM7 12h5V7H7zM14 12h5V7h-5zM0 19h5v-5H0zM7 19h5v-5H7zM14 19h5v-5h-5z"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerlink="/tests" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewbox="0 0 22 22">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M7.838 16.163v-1.458l1.461 1.458H7.838zm11.57-10.107l-8.813 8.806-1.461-1.456L17.947 4.6l1.461 1.457zm2.592 0L17.947 2 6 13.944V18h4.053L22 6.056z"></path>
                                    <path d="M16 15.583h-1.882v4.584H1.882V1.833h12.236v1.834H16V0H0v22h16v-6.417"></path>
                                    <path d="M3 5h7V4H3zM3 8h5V7H3zM3 12h3v-1H3z"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" hidden="">
                        <a class="nav-link" routerlink="/alliance" routerlinkactive="active">
                            <i class="nav-icon material-icons">people</i>
                            <span class="nav-text" translation="new_id">
                                Alliance
                            </span>
                        </a>
                    </li>
                    <li class="nav-item" hidden="">
                        <a class="nav-link" routerlink="/financial" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" viewbox="0 0 22 20">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M1.913 10.585h1.014l.226-.628A4.722 4.722 0 0 1 4.81 7.76h1.885V4.174c1.633.419 1.903 1.27 1.912 2.085v.56h5.74c2.637 0 4.782 2.112 4.782 4.707 0 1.672-.916 3.233-2.392 4.074l-.477.272v2.245h-1.913v-1.883H9.565v1.883H7.652v-1.824l-.797-.133a4.816 4.816 0 0 1-3.406-2.386l-.142-.26-1.394-.686v-2.243zm3.826 7.25V20h5.74v-1.883h.956V20h5.739v-3.07c1.783-1.226 2.87-3.249 2.87-5.404 0-1.103-.28-2.144-.771-3.06A2.825 2.825 0 0 0 22 5.876h-1.913a.95.95 0 0 1-.957.942v.104a6.725 6.725 0 0 0-4.782-1.987H10.31c-.427-1.287-1.614-2.504-4.465-2.818L4.783 2v3.595a6.661 6.661 0 0 0-3.171 3.107H0v5.29l1.925.947a6.75 6.75 0 0 0 3.814 2.896z"></path>
                                    <path d="M12 2a2 2 0 1 0 4 0 2 2 0 0 0-4 0"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" hidden="">
                        <a class="nav-link" routerlink="/subscription" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewbox="0 0 22 22">
                                <g class="svg_img" fill="#92A2A3" fill-rule="evenodd">
                                    <path d="M4 9c1.1 0 2-.895 2-2 0-1.104-.9-2-2-2s-2 .896-2 2c0 1.105.9 2 2 2M.91 22h1.817v-5.538h.91V22h1.818V11.846H10V10H1.818C.818 10 0 10.828 0 11.846v4.616h.91V22M19.273 10.083c.5 0 .909.412.909.917 0 .506-.41.917-.91.917s-.908-.411-.908-.917c0-.505.409-.917.909-.917zm0 8.25c.5 0 .909.412.909.917 0 .506-.41.917-.91.917s-.908-.411-.908-.917c0-.505.409-.917.909-.917zm0-16.5c.5 0 .909.412.909.917 0 .506-.41.917-.91.917s-.908-.411-.908-.917c0-.505.409-.917.909-.917zm-2.555 1.834c.373 1.065 1.373 1.833 2.555 1.833C20.773 5.5 22 4.267 22 2.75 22 1.234 20.773 0 19.273 0c-1.182 0-2.182.77-2.555 1.833h-2.9v8.25H12v1.834h1.818v8.25h2.9C17.091 21.232 18.091 22 19.273 22c1.5 0 2.727-1.233 2.727-2.75 0-1.516-1.227-2.75-2.727-2.75-1.182 0-2.182.77-2.555 1.833h-1.082v-6.416h1.082c.373 1.065 1.373 1.833 2.555 1.833 1.5 0 2.727-1.233 2.727-2.75 0-1.516-1.227-2.75-2.727-2.75-1.182 0-2.182.77-2.555 1.833h-1.082V3.667h1.082z"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" routerlink="/teams" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="20" viewbox="0 0 24 20">
                                <g class="svg_img" fill="#95A5A6" fill-rule="evenodd">
                                    <path d="M15 18h7v-1h-7v1zM2 18h7v-1H2v1zm12-3v1h-4v-1H0v3c0 1.103.9 2 2 2h20c1.1 0 2-.897 2-2v-3H14zM3 2h18v12h2V2c0-1.103-.9-2-2-2H3C1.9 0 1 .897 1 2v12h2V2"></path>
                                    <path d="M5 12v2h8v-2c0-1.104-.9-2-2-2H7c-1.1 0-2 .896-2 2M11 7c0-1.104-.9-2-2-2s-2 .896-2 2c0 1.105.9 2 2 2s2-.895 2-2M15 7v3l1.5-1.499L18 7l-3-3v3"></path>
                                </g>
                            </svg>
                        </a>
                    </li>
                    <li class="nav-item" *ngxpermissionsonly="'view_admin'">
                        <a class="nav-link" routerlink="/admin" routerlinkactive="active">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24">
                                <path class="svg_img" fill="#95A5A6" fill-rule="evenodd" d="m20.731 13.671 1.9746 1.1398c0.22551 0.13015 0.33018 0.3993 0.25294 0.64798-0.51291 1.6514-1.3886 3.1434-2.5339 4.3825a0.55675 0.55675 0 0 1 -0.68722 0.10443l-1.9731-1.1396a8.8765 8.8765 0 0 1 -2.8152 1.6277v2.2788a0.55647 0.55647 0 0 1 -0.43447 0.54294c-1.6196 0.36372-3.3592 0.38253-5.0605 3.3e-4 -0.25437-0.0571-0.43568-0.28246-0.43568-0.54317v-2.2789a8.8755 8.8755 0 0 1 -2.8152 -1.6277l-1.9731 1.1396a0.55675 0.55675 0 0 1 -0.68722 -0.10443c-1.1453-1.2392-2.021-2.7311-2.5339-4.3825-0.0772-0.24863 0.0274-0.51778 0.25293-0.64798l1.9746-1.1398a8.9646 8.9646 0 0 1 0 -3.2526l-1.9746-1.1398c-0.22551-0.13015-0.33018-0.39931-0.25294-0.64798 0.51292-1.6514 1.3886-3.1434 2.534-4.3825a0.55675 0.55675 0 0 1 0.68722 -0.10444l1.9731 1.1396a8.8765 8.8765 0 0 1 2.8152 -1.6277v-2.2788a0.55647 0.55647 0 0 1 0.43447 -0.54294c1.6196-0.36372 3.3592-0.38253 5.0605-3.2e-4 0.25437 0.0571 0.43568 0.28245 0.43568 0.54317v2.2789a8.8755 8.8755 0 0 1 2.8152 1.6277l1.9731-1.1396a0.55675 0.55675 0 0 1 0.68722 0.10443c1.1453 1.2392 2.021 2.7311 2.534 4.3825 0.0772 0.24863-0.0274 0.51778-0.25294 0.64798l-1.9746 1.1398a8.9649 8.9649 0 0 1 0 3.2526zm-5.0406-1.6263c0-2.0439-1.6628-3.7067-3.7067-3.7067-2.0439 0-3.7067 1.6628-3.7067 3.7067 0 2.0439 1.6628 3.7067 3.7067 3.7067 2.0439 0 3.7067-1.6628 3.7067-3.7067z" stroke-width=".046334"></path>
                            </svg>
                        </a>
                    </li>
                </ul>
            </nav>
        </mat-sidenav>
        <mat-sidenav-content id="content-wrapper" [ngclass]="{'anonymous': !(authService.isAuthenticated() | async) || !isNavigationVisible()}">
            <router-outlet></router-outlet>
        </mat-sidenav-content>
    </mat-sidenav-container>
</ng-container>

枚举进行的自动更正:

  1. ngIf和其他属性现在为小写
  2. 隐藏变成了隐藏=“ =”
  3. 自封闭的<path>
  4. <path />个节点现在变成</path>

这些正是我观察到的。

我只希望我所做的更改受externalHTML的影响。

0 个答案:

没有答案
相关问题