Skip to content

Commit

Permalink
[fix] 0.4.1 #2
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzy-ax committed Jan 8, 2019
1 parent f87b94d commit 5bf3078
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the [project](https://github.com/mazzy-ax/Update-Lbi) will be documented in this file. See also <https://github.com/mazzy-ax/Update-Lbi/releases>.

## [0.4.1](https://github.com/mazzy-ax/Update-Lbi/compare/v0.4.0...v0.4.1) - 2019-01-08

* Fix bug #2 with extra space

## [0.4.0](https://github.com/mazzy-ax/Update-Lbi/compare/v0.3.0...v0.4.0) - 2018-05-12

* The directory structure reorganized to remove media, examples and tests from nuget downloads and powershell gallery
Expand Down
3 changes: 2 additions & 1 deletion Tests/TestData/Library/testdiv.lbi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div>
div content
div line 1
div line 2
</div>
5 changes: 3 additions & 2 deletions Tests/TestData/index.expected
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<html>
<body>
<p>some text content with <!-- #BeginLibraryItem "/Library/onliner.lbi" --><span>onliner!</span><!-- #EndLibraryItem -->.</p>
anoter text<!-- #BeginLibraryItem "/Library/testdiv.lbi" -->
another text<!-- #BeginLibraryItem "/Library/testdiv.lbi" -->
<div>
div content
div line 1
div line 2
</div>
<!-- #EndLibraryItem -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestData/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<body>
<p>some text content with <!-- #BeginLibraryItem "/Library/onliner.lbi" -->is it updated from lbi-file?<!-- #EndLibraryItem -->.</p>
anoter text<!-- #BeginLibraryItem "/Library/testdiv.lbi" -->is it indented?<!-- #EndLibraryItem -->
another text<!-- #BeginLibraryItem "/Library/testdiv.lbi" -->is it indented?<!-- #EndLibraryItem -->
</body>
</html>
16 changes: 13 additions & 3 deletions Tests/TestData/test.expected
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<!-- html fragment -->

<!-- #BeginLibraryItem "/Library/testdiv.lbi" -->
<div>
div line 1
div line 2
</div>
<!-- #EndLibraryItem -->

more <!-- #BeginLibraryItem "/Library/testdiv.lbi" -->
<div>
div content
div line 1
div line 2
</div>
<!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/testdiv.lbi" -->
<div>
div content
div line 1
div line 2
</div>
<!-- #EndLibraryItem -->
<!-- #EndLibraryItem -->
7 changes: 6 additions & 1 deletion Tests/TestData/test.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
<!-- html fragment -->
more <!-- #BeginLibraryItem "/Library/testdiv.lbi" -->is it indented?<!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/testdiv.lbi" -->is it indented?<!-- #EndLibraryItem -->

<!-- #BeginLibraryItem "/Library/testdiv.lbi" -->
multiline with ident after whitespace lines
<!-- #EndLibraryItem -->

more <!-- #BeginLibraryItem "/Library/testdiv.lbi" -->is it indented?<!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/testdiv.lbi" -->is it indented?<!-- #EndLibraryItem -->
2 changes: 1 addition & 1 deletion Tests/Update-Lbi.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $moduleName = Split-Path $moduleRoot -Leaf

$assets = "$projectRoot\Tests\TestData"

#Import-Module $moduleRoot -Force
Import-Module $moduleRoot -Force

Describe $moduleName -Tags Run, UnitTest, UT {

Expand Down
16 changes: 5 additions & 11 deletions Update-Lbi.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,17 @@
<metadata>
<id>update-lbi</id>
<title>update-Lbi</title>
<version>0.4.0</version>
<version>0.4.1</version>
<authors>Sergey Mazurkin</authors>
<licenseUrl>https://github.com/mazzy-ax/Update-Lbi/blob/master/LICENSE</licenseUrl>
<license type="expression">MIT</license>
<projectUrl>https://github.com/mazzy-ax/Update-Lbi</projectUrl>
<iconUrl>https://github.com/mazzy-ax/Update-Lbi/blob/master/Media/Update-Lbi-icon.png?raw=true</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Powershell cmdlet updates Dreamweaver library items (LBI) within html-files.</description>
<description>Powershell advanced function updates Dreamweaver library items (LBI) within html-files.</description>
<releaseNotes>
## 0.4.0
## 0.4.1

* The directory structure reorganized to remove media, examples and tests from nuget downloads and powershell gallery
* Cmdlets extracted to separate files
* The list of public cmdlets changed. Public cmdlets are: Update-Lbi, Read-Lbi, Reset-LbiCache. Other cmdlets are internal
* A required version changed from 3.0 to 5.0 because a 'class' used
* Project meta info tests added
* The name of the cmdlet Update-LbiItems changed to Update-LbiItem due psScriptAnalyzer recommendations
* Readme and typo cleared
* Fix bug #2 with extra space
</releaseNotes>
<tags>dreamweaver library lbi html</tags>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion Update-Lbi/Classes/Classes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Class HtmlFragment {
}

[String]LastLineIndent([String]$PreviousIndent = '') {
if ( $this.Value -match '(?<indent>\n\s*)(?:.*)$' ) {
if ( $this.Value -match '(?<indent>\n[\t ]*)(?:.*)$' ) {
return $Matches['indent']
}

Expand Down
Binary file modified Update-Lbi/Update-Lbi.psd1
Binary file not shown.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See http:https://www.appveyor.com/docs/appveyor-yml for many more options

version: 0.4.0.{build}
version: 0.4.1.{build}

only_commits:
files:
Expand Down

0 comments on commit 5bf3078

Please sign in to comment.