diff --git a/pom.xml b/pom.xml index a203faf..91ee031 100644 --- a/pom.xml +++ b/pom.xml @@ -167,6 +167,7 @@ **/main/resources/META-INF/resources/frontend/prism.js **/main/resources/META-INF/resources/frontend/prism.css **/test/resources/** + **/main/dev-bundle/** diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/DemoHelperViewer.java b/src/main/java/com/flowingcode/vaadin/addons/demo/DemoHelperViewer.java index 3d0e733..d0a5333 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/DemoHelperViewer.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/DemoHelperViewer.java @@ -2,7 +2,7 @@ * #%L * Commons Demo * %% - * Copyright (C) 2020 - 2023 Flowing Code + * Copyright (C) 2020 - 2024 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/DemoSources.java b/src/main/java/com/flowingcode/vaadin/addons/demo/DemoSources.java index 083c46f..741aeb4 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/DemoSources.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/DemoSources.java @@ -1,3 +1,22 @@ +/*- + * #%L + * Commons Demo + * %% + * Copyright (C) 2020 - 2024 Flowing Code + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ package com.flowingcode.vaadin.addons.demo; import java.lang.annotation.ElementType; diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java b/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java index b06e68a..0014d1d 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java @@ -1,3 +1,22 @@ +/*- + * #%L + * Commons Demo + * %% + * Copyright (C) 2020 - 2024 Flowing Code + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ package com.flowingcode.vaadin.addons.demo; import com.vaadin.flow.component.ComponentUtil; diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeTab.java b/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeTab.java index 2447cf2..31f7632 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeTab.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeTab.java @@ -1,3 +1,22 @@ +/*- + * #%L + * Commons Demo + * %% + * Copyright (C) 2020 - 2024 Flowing Code + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ package com.flowingcode.vaadin.addons.demo; import lombok.AccessLevel; diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java b/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java index 300cceb..89a40f1 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java @@ -2,7 +2,7 @@ * #%L * Commons Demo * %% - * Copyright (C) 2020 - 2023 Flowing Code + * Copyright (C) 2020 - 2024 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/SourcePosition.java b/src/main/java/com/flowingcode/vaadin/addons/demo/SourcePosition.java index 674aa7c..fa96948 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/SourcePosition.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/SourcePosition.java @@ -1,3 +1,22 @@ +/*- + * #%L + * Commons Demo + * %% + * Copyright (C) 2020 - 2024 Flowing Code + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ package com.flowingcode.vaadin.addons.demo; public enum SourcePosition { diff --git a/src/main/resources/META-INF/resources/frontend/code-viewer.ts b/src/main/resources/META-INF/resources/frontend/code-viewer.ts index 44f1a72..709cc93 100644 --- a/src/main/resources/META-INF/resources/frontend/code-viewer.ts +++ b/src/main/resources/META-INF/resources/frontend/code-viewer.ts @@ -250,7 +250,7 @@ pre[class*="language-"] { let end = text.indexOf('*/'); if (end<0) break; - let pos = text.indexOf('#%L'); + let pos = text.indexOf('#'+'%L'); if (pos<0 || end