Skip to content

Commit

Permalink
Add support for audio tag hyphanet#15
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreRio committed Mar 9, 2020
1 parent 3b4baca commit ff9a0ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/floghelper/contentsyntax/RawXHTML.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public RawXHTML() {
// Pictures
this.syntaxElements.add(new SyntaxElement(FlogHelper.getBaseL10n().getString("Picture"), "<img alt=\"Image\" src=\"", "\" />"));

// Audio
this.syntaxElements.add(new SyntaxElement(FlogHelper.getBaseL10n().getString("Audio"), "<audio controls=\"controls\" preload=\"auto\" type=\"audio/mpeg\" style=\"height: 20px;\" src=\"", "\" />"));

// Size and color
this.syntaxElements.add(new SyntaxElement(FlogHelper.getBaseL10n().getString("Size"), "<span style=\"font-size: 1em;\">", "</span>"));
this.syntaxElements.add(new SyntaxElement(FlogHelper.getBaseL10n().getString("Color"), "<span style=\"color: #000000;\">", "</span>"));
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/floghelper/contentsyntax/YAWKL.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public YAWKL() {
Pattern.MULTILINE | Pattern.CASE_INSENSITIVE,
"<img alt=\"Image\" src=\"$1\" />", false));

// Audio
this.syntaxElements.add(new SyntaxElement(FlogHelper.getBaseL10n().getString("Audio"), "[[audio|", "]]",
SyntaxElement.begin + "(.+?)" + SyntaxElement.end,
Pattern.MULTILINE | Pattern.CASE_INSENSITIVE,/
"<audio controls=\"controls\" preload=\"auto\" type=\"audio/mpeg\" style=\"height: 20px;\" src=\"$1\" />", true));

// Size and color
this.syntaxElements.add(new SyntaxElement(FlogHelper.getBaseL10n().getString("Size"), "[[1em|", "]]",
"\\[\\[((([0-9]|\\.)+)(px|em|pt))\\|(.+?)\\]\\]",
Expand Down

0 comments on commit ff9a0ad

Please sign in to comment.