-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb242fe
commit a57c5e4
Showing
6 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* This file is part of the DITA-OT Unit Test Plug-in project. | ||
* See the accompanying LICENSE file for applicable licenses. | ||
*/ | ||
|
||
package fox.jason.unittest.tasks; | ||
|
||
import org.apache.tools.ant.BuildException; | ||
import org.apache.tools.ant.Task; | ||
|
||
// Task to extract the string between <article> tags. | ||
|
||
public class FindBodyTask extends Task { | ||
|
||
/** | ||
* Creates a new <code>FindBodyTask</code> instance. | ||
*/ | ||
public FindBodyTask() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Method execute. | ||
* | ||
* @throws BuildException if something goes wrong | ||
*/ | ||
@Override | ||
public void execute() { | ||
String input = getProject().getProperty("htmlSource"); | ||
int start = input.indexOf("<body"); | ||
int end = input.indexOf("</body>") + 7; | ||
getProject().setProperty("fragment", input.substring(start, end)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters